7
votes

As the title indicates, I am having an issue when using UINavigationControllers as the Master and Detail view in a UISplitView. The navigation controllers leave space for a bottom bar. When I remove the nav controllers, the views are rendered just fine.

The storyboard looks like:

TabBarController -> SplitView -> UINavigationController (master and detail) -> ViewControllers for each.

I am able to "hack" the view to render properly by adding 40px of extra space as a constraint, but I would rather not do that.

What am I missing?

EDIT: I've mocked everything up in an empty project and it seems to work fine by default. It seems I've changed some setting or doing something in my main project that is causing this issue.

The gray space is what I am trying to remove.

2

2 Answers

13
votes

turn on under opaque bars bruh

3
votes

I had this same issue. It worked fine in iOS 11 but on iOS 10 there was a space above the top subview for both the master and detail view. I fixed it by unchecking "Under Top Bars" in both UIViewControllers and checking "Under Opaque Bars" in both UIViewControllers

enter image description here