Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Labels covered by TabBar using Autolayout

I am making an App using TabBarController and AutoLayout.

Whenever I compile the App either on Simulator or on the Device the lower labels, buttons and other views are covered by the TabBar. The views have constraints so that they would stick to the top and bottom and a View (i.e. MapView) would stretch.

The case that the views would slip under the TabBar happens only in iOS 7 but not in iOS 6.1 and lower. Any ideas or is it just a bug in the compiler?

like image 378
Christian Seiler Avatar asked Sep 24 '13 10:09

Christian Seiler


2 Answers

The correct answer is to undo Extend Edges either programmatically or through the right panel on a view controller. Click on your view controller and uncheck "Under bottom bars":

image

like image 72
steve Avatar answered Oct 26 '22 15:10

steve


I think I found one solution (although it is not what autolayout is supposed to be):

I added the constraint with the |- + -| on the bottom of the storyboard window. In the big cross I added the bottom constraint with a fixed length to viewinstead of bottom layout guideand used the current distance (in my case 57).

With this way the Buttons and scrollViews stay at away from the TabBar and don't disappear anymore.

like image 23
Christian Seiler Avatar answered Oct 26 '22 15:10

Christian Seiler