【iOS】push控制器时隐藏tabbar,dismiss控制器时显示tabbar

在push之前将控制器的属性hidesBottomBarWhenPushed设置为yes就好。

//准备要把控制器vc给push出去了
UIViewController *vc = [[UIViewController alloc]init];
vc.hidesBottomBarWhenPushed = YES;
/*push没动静NSLog(@"%@",self.navigationController);检查自己的控制器是不是为空*/
[self.navigationController pushViewController:vc animated:YES];
posted @ 2017-12-14 21:00  MrYu4  阅读(35)  评论(0编辑  收藏  举报