Jason Hocker
Jason Hocker

Reputation: 7067

black bar in UISplitViewController within UITabBarController

We have a Tab controller. Inside that we want to have split controllers on the different tabs. When we build this, why do we get garbage space between the content and the tab bar? We built an example which I pasted an image from below.

I do not want to change the color from black. I want the master and detail views to go from the status bar to the top of the tab bar.

storyboard example

Edit: Added an image to show the problem. It doesn't match the original storyboard because we are trying to experiment on a small scale before pushing to our main app and we are constantly editing to figure out how to solve this. You'll see in this image there is a gray bar in the master list that shouldn't be there.

enter image description here

Upvotes: 4

Views: 634

Answers (2)

JanApotheker
JanApotheker

Reputation: 1906

To get rid of the grey bar, check 'Under Opaque Bars' (under Extend Edges) in the Storyboard or set it manually

splitviewController.extendedLayoutIncludesOpaqueBars = true

However, I have currently no idea what is causing this and if it breaks something else down the road so please keep that in mind.

Upvotes: 4

Trantec
Trantec

Reputation: 407

You need to enable "Under Button Bars" for the Detail and Master ViewControllers, you can set it in the attribute inspector.

Upvotes: 0

Related Questions