在嵌入 UINavigationController 的 containerView 中。该 navController 2 viewControllers 已连接。请参见下图。
一切正常,除了两个 childViewControllers 都有一个无论我尝试什么都无法隐藏的 TabBar。这是它在设备上的样子。 蓝色是containerView的背景色 这就是我试图对 childViewControllers 隐藏的方式
self.tabBarController!.tabBar.hidden = true
self.navigationController!.toolbarHidden = true
self.navigationController!.tabBarController!.tabBar.hidden = true
self.navigationController?.setNavigationBarHidden(true, animated: false)
从包含的 View Controller :
self.childViewNavigationController.toolbarHidden = true
self.childViewNavigationController.setToolbarHidden(true, animated: false)
self.childViewNavigationController.tabBarController!.tabBar.hidden = true
self.childViewNavigationController.setNavigationBarHidden(true, animated: false)
蓝色区域有 49 点高,这就是为什么我认为它是为标签栏保留的。
最佳答案
问题没有解决。幸运的是,主视图 Controller 需要呈现,而不是推送,所以 subview 的导航 Controller 没有从主视图 Controller 的导航 Controller 继承任何东西,标签栏区域消失了。
关于ios - 无法在 subview Controller 中隐藏选项卡栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34290344/