【发布时间】:2023-03-27 22:01:01
【问题描述】:
在我嵌入 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)
并来自包含的视图控制器:
self.childViewNavigationController.toolbarHidden = true
self.childViewNavigationController.setToolbarHidden(true, animated: false)
self.childViewNavigationController.tabBarController!.tabBar.hidden = true
self.childViewNavigationController.setNavigationBarHidden(true, animated: false)
蓝色区域高 49 点,这就是为什么我认为它是为标签栏保留的。
【问题讨论】:
标签: ios swift storyboard