self.hidesBottomBarWhenPushed = YES;
有时候push过去时会正常隐藏tabBar,但是push back后tabBar又不显示了,此时可以重写navigationController的pushViewController方法
“`
-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
viewController.hidesBottomBarWhenPushed = YES;
[super pushViewController:viewController animated:animated];
viewController.hidesBottomBarWhenPushed = NO;
}
“`