我正在将UITabBarController隐藏在TabBar项ChildViewControllers中。
For Ex.假设我的主屏幕中有两个选项卡条项,第一个选项卡条项被选中,我想先导航第一个选项卡栏,然后将TabBar隐藏在第一个TabBar项childViewControllers中。
发布于 2017-09-20 07:57:06
我找到了解决办法
[self.tabBarController.tabBar setHidden:YES];使用隐藏属性在viewDidLoad中使用隐藏选项卡项。并在storyBoard ViewController中选择“不透明条”选项。
发布于 2017-09-20 08:21:14
在视图被推送或显示之前。视图控件上的hidesBottomBarWhenPushed变量将被检查,并自动隐藏底部栏。您可以通过两种方式使用它:
1-在子控制器中重写它:
override var hidesBottomBarWhenPushed: Bool {
return true
}2-您可以在执行segue之前设置它,以准备segue:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "identifier" {
segue.destination.hidesBottomBarWhenPushed = true
}
}https://stackoverflow.com/questions/46316163
复制相似问题