Search code examples
iosswiftuinavigationcontrolleruitabbarcontroller

push / present view controller over tab bar Swift


I try to reproduce the same way to push the screen as in the fb messenger for example.

My schema: TabController -> NavController-> embedVC-> pushedVC.

The pushedVC must be over tabbar. I don't want to hide it with tabbar.isHidden = true.


Solution

  • Try to use UIViewController.hidesBottomBarWhenPushed = true on that screen where you need to hide the tab bar. You can also try to arrange the UITabBarController as child in UINavigationController. As far as I know (I can be wrong), UITabBarController will not work in the UINavigationController, so sometimes someone uses their custom TabBarController.