问题描述:

In my containerView that embeds a UINavigationController. To that navController 2 viewControllers are connected. See the image bellow.

Everything works well, except for both childViewControllers get a TabBar that i cannot hide no matter what i try. Here's what it looks like on device.

Blue is the background color of the containerView

Here's how i'm trying to hide from the childViewControllers

 self.tabBarController!.tabBar.hidden = true

self.navigationController!.toolbarHidden = true

self.navigationController!.tabBarController!.tabBar.hidden = true

self.navigationController?.setNavigationBarHidden(true, animated: false)

and from the containing viewcontroller:

 self.childViewNavigationController.toolbarHidden = true

self.childViewNavigationController.setToolbarHidden(true, animated: false)

self.childViewNavigationController.tabBarController!.tabBar.hidden = true

self.childViewNavigationController.setNavigationBarHidden(true, animated: false)

The blue area is 49 points high, that's why i 'm thinking it's reserved for a tab bar.

网友答案:

The issue left unresolved. Fortunately the main viewcontroller needed to be presented, instead of pushed, so childview's navigationcontroller didn't inherit anything from the main viewcontroller's navigationcontroller and the area for the tab bar disappeared.

相关阅读:
Top