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

来源:互联网 发布:微波遥感数据 编辑:程序博客网 时间:2024/06/08 06:30

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

//准备要把控制器vc给push出去了UIViewController *vc = [[UIViewController alloc]init];vc.hidesBottomBarWhenPushed = YES;/*push没动静NSLog(@"%@",self.navigationController);检查自己的控制器是不是为空*/[self.navigationController pushViewController:vc animated:YES];
原创粉丝点击