TabBar没有隐藏在推送的ViewController中,我使用下面的代码来隐藏tabBar,
tabBarController?.tabBar.isHidden = true
or
self.hidesBottomBarWhenPushed = true
但仍有一些延迟后tabBar出现。如果有人遇到这种问题,并能够解决它。你的答案将非常有帮助。
我在故事板上做过这个。
如果要隐藏特定控制器上的tabor,可以执行以下操作:
controller.hidesBottomBarWhenPushed = true
UITabBarController
有属性hidesBottomBarWhenPushed
所以你必须在你要推动的控制器上设置true
。
例如:
//pushedVC - VC you try to push(the one where you don't want to show TabBar)
pushedVC.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(pushedVC, animated: true)
要么
在Storyboard
中设置此项