Pin*_*nky 2 iphone objective-c mobile-application ios7 xcode5
在iOS 7中,TabBar在我使用时隐藏,nextviewcontroller.hidesBottomBarWhenPushed = YES;
但是当我弹回viewcontroller时需要再次显示tabbar.
它不会回来使用nextviewcontroller.hidesBottomBarWhenPushed = NO;
任何帮助将不胜感激.
这解决了我的问题:
- (void)viewWillAppear:(BOOL)animated {
self.tabBarController.tabBar.hidden = YES;
}
- (void)viewWillDisappear:(BOOL)animated {
self.tabBarController.tabBar.hidden = NO;
}
Run Code Online (Sandbox Code Playgroud)
我找到了最简单的方法来实现UITabBar的隐藏和显示.
nextviewcontroller.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:nextviewcontroller animated:YES];
nextviewcontroller.hidesBottomBarWhenPushed = NO;
Run Code Online (Sandbox Code Playgroud)
因此,在您按下视图控制器后立即设置hidesBottomBarWhenPushed = NO; 这样,当您返回查看控制器时,将显示Tabbar.
| 归档时间: |
|
| 查看次数: |
1634 次 |
| 最近记录: |