隐藏UITabBarController中的tabbar

时间:2014-10-19 17:03:48   收藏:0   阅读:215

在pushViewController之前调用:

1 self.hidesBottomBarWhenPushed = YES;
2 ZWMessageViewController *messageController = [[ZWMessageViewController alloc] initWithDict:_dataSource[indexPath.row]];
3 [self.navigationController pushViewController:messageController animated:YES];

或者是在 - (void)viewWillAppear:(BOOL)animated 中设置 

self.hidesBottomBarWhenPushed = YES;

同时在viewWillDisappear调用:

1 - (void)viewWillDisappear:(BOOL)animated {
2         [super viewDidDisappear:animated];
3         self.hidesBottomBarWhenPushed = NO; // 不设置这个,界面跳转回来的时候,tabbar不能成功显示
4 }

 

原文:http://www.cnblogs.com/zw-h/p/4035026.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!