0

I am having trouble with ios7 layouts, in particular with a split view inside a tabbar controller. This used to work perfectly, but despite searching high and load, attempting to resize view, change origins, autolayout, etc, I cannot get the view to display correctly.

A grey bar appears below my view and above the tabbar, equal to the height of the navigation bar. Another SO user has had the same problem, and shows a picture exactly of what I'm experiencing. See here: UISplitView with UITabbar

Unfortunately, the solution of the above question:

self.extendedLayoutIncludesOpaqueBars = YES;

does not work for me.

A framework of my code which displays the issue is available here: https://github.com/ziophase/IntelligentTemplate

Thanks in advance!

Community
  • 1
  • 1
Tim
  • 359
  • 3
  • 13

2 Answers2

3

The solution is quite simple:
Check the three marks of Extend Edges, wich are properties of the UISplitViewController found in the Attribute Inspector

Here: Interface Builder Screenshot

That worked for me!

lootsch
  • 1,867
  • 13
  • 21
0

The solution is not quite as simple as the accepted answer (from lootsch) implies.

It is necessary also to make sure that in Interface Builder the Navigation Bar Translucency is switched off (See screen shot, which is actually for the table view for colour consistency. The key one is the second Navigation bar which is for the detail view).

Otherwise in complex detail views (as in an app of mine) the layout may initially not extend under the Navigation bar, but after flipping back and forth between table menu items (or launching a mapview) it suddenly slips below the bar. It won't slip below the navigation bar if it is not translucent, so you can set your layout with impunity.

I would also add that in the accepted answer the Extended Edges Under Top Bars made no difference in my app, although the other two were both absoutely necessary.

Switch off translucency in Navigation Bar

David
  • 1,018
  • 13
  • 22