5
votes

I have a window with a UITabBarController as rootViewController. The UITabBarController has two children: A UINavigationController and a UISplitViewController (according to the latest docs this should be OK, and it works except for the following problem).

Both the UINavigationController as well as the UISplitViewController show a MyMasterTableViewController which can push instances of MyDetailViewController. MyDetailViewController has self.hidesBottomBarWhenPushed = YES to make the TabBar disappear on push.

When I push MyDetailViewController onto the UINavigationController the UITabBar disappears as expected. When I show MyDetailViewController on the UISplitViewController while it is collapsed, I would expect the same, since the collapsed UISplitViewController contains only a UINavigationController with the Master which pushes the Detail ViewController. It doesn't however.

How can I let a collapsed UISplitViewController make the UITabBar hide on showing MyDetailViewController like the UINavigationController does?

1
I have been really struggling with this - did you find a solution to this problem by any chance?SAHM
No, I gave up and stopped using a UITabBarController and a UISplitViewController together. 😢Stefan

1 Answers

1
votes

Unfortunately you cannot take advantage of Hide Bottom Bar on Push while using a UISplitViewController inside a UITabBarController. You can override the UITabBarController viewControllers and for the iPhone only, point to the MasterViewController's UINavigationController in the Storyboard. This is where you can Hide Bottom Bar on Push. The UISplitViewController for some reason does not respect the flag on a push, probably for iPad purposes.enter image description here