Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UISplitView with UITabbar

I have a strange one that I can not seem to fix. I am currently working on updating my app to iOS7. This all worked in iOS6. It is an universal app and thus uses same xib files. However the iPad uses UISplitViews on some. Like I said, this all worked in iOS6 oh this all works on the iPhone too.

The problem is a grey bar at the bottom. I changed the tab bar to be opaque to move views up properly as i had some UI clipped to bottom of views and that went underneath the tab bar, sidetracked there. But if i set it back to translucent bar, it goes underneath but stretched properly. if i dont, it adds a bar. Other tabs work fine when NOT using splitview.

The UISplitviewController is added programmatically.

See attached image for better description.

The grey bar is between my splitview and tabbar

This I have tried:

  • Added autoresize on splitview
  • Checked xib for subviews in the splitviews to have auto resize
  • Tried to force splitview to be screen bounds
  • Removed clips to bounds on all views
  • Removed autoresize subviews

Any ideas would be welcomed.

Thank you all.

UPDATE:

setting the background colour the uisplitview, it does colour the bar black. So the uisplitview is definitely stretching to it.

like image 411
mashdup Avatar asked Sep 24 '13 11:09

mashdup


1 Answers

I subclassed UISplitViewController and added the line below to viewDidLoad and that fixed the grey line.

self.extendedLayoutIncludesOpaqueBars = YES;
like image 78
mick80234 Avatar answered Oct 05 '22 11:10

mick80234