Search code examples
iosuinavigationcontrolleruitabbarcontrolleruistoryboard

When I from a navigation controller( which is embed in a TabbarController) push to a new TabbarController, there is short than normal


When I push from a navigation controller (which is embed in a tabbar controller) to a new tabbar controller.

There is an issue here, the new tabbar controller is short than normal.

You can see the black rectangle under the tabbar of new tabbar controller.

And in the view hierarchy:

enter image description here

How to solve this issue here?

If can not, how to avoid this issue? I want from a tabbar controller push to a new tabbar controller.


Solution

  • If you created a storyboard item for TabBarController you wish to push to from navigation Controller, go to it and click on the checkbox Hide Bottom Bar On Push . This will hide the bottom tabBar of the parent TabBarController.

    Do note that Apple does not recommend TabBarController to be rootViewController of Navigation Controller.

    Image