Cannot hide tab bar in child view controller

In my container that the UINavigationController is built into. NavController 2 viewControllers are connected to this. See image below. enter image description here

Everything works well, except that both childViewControllers get a TabBar, which I cannot hide, no matter what. Here's how it looks on the device. enter image description here Container background blue This is how I try to hide from 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, so I think it is reserved for the tab bar.

+5
source share
1 answer

The problem remained unresolved. Fortunately, the main view manager was supposed to be presented, not clicked, so the childview navigation manager did not inherit anything from the main navigation controller of the viewcontroller, and the area for the tab bar disappeared.

0
source

Source: https://habr.com/ru/post/1238263/


All Articles