如何隐藏的TabBar在RootView ChildViewControllers
问题描述:
我在躲UITabBarController
困扰的TabBar项目ChildViewControllers
如何隐藏的TabBar在RootView ChildViewControllers
对于防爆内。假设我们已经在我的主屏幕,第一个标签栏项目两个制表栏项目被选中,我想要去与导航第一标签栏的话,我想隐藏的TabBar在第一的TabBar项目childViewControllers
答
我发现此解决方案
[self.tabBarController.tabBar setHidden:YES];
使用hide隐藏属性的viewDidLoad中的标签栏项目。 并在storyBoard ViewController中选择“不透明酒吧”选项。
答
视图被推送或显示之前。 hidesBottomBarWhen在viewcontroll上的压缩变量将被检查并自动隐藏底部栏。您可以通过两种方式使用它:
1-覆盖它在孩子的控制器:
override var hidesBottomBarWhenPushed: Bool {
return true
}
2 - 你可以在执行前赛格瑞设置在赛格瑞准备:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "identifier" {
segue.destination.hidesBottomBarWhenPushed = true
}
}
非常感谢.... –