0

Is there a way to use Interface Builder to maximize a view for the w:Any h:Any size classes without relying on iOS8 only features?

I'm trying to have a simple scrollview inside a navigation controller and a tab bar with some horizontal centered labels. But I can't even get the scrollview to be maximized without getting layout attributes relative to the layout margin or misplaced view warnings.

I dragged the scrollview across the canvas between navigation bar and tab bar. I set contraints of the scrollview to center alignment Y and X and vertical space at the top to take in account of the navigationbar.

Now when I try to add a contraint to have the bottom next to the navigationbar I get the iOS 8.0 warning.

Also I don't understand what width and height I need to set when I want the object to be dynamically maximized depending on the device or orientation - I thought that was the point of auto layout.

F. Rakes
  • 1,487
  • 3
  • 17
  • 25
  • [This question](http://stackoverflow.com/a/24976792/1292061) might be relevant. – ravron Oct 20 '14 at 19:22
  • Yes it is, thanks for pointing me in the right direction. – F. Rakes Oct 20 '14 at 19:38
  • If you've found an answer, be sure to come back here and answer your own question so that the next person who comes looking can see what you figured out. – ravron Oct 21 '14 at 11:59

1 Answers1

0

As Riley pointed out this question/answer helped me to get started.

Also specifically to my scrollview problem I needed to make the following constraints:

vertical space top and bottom, horizontal space left and right, center x alignment and most importantly don't use the checkbox "constrain to margin" which is only available for iOS8+.

Community
  • 1
  • 1
F. Rakes
  • 1,487
  • 3
  • 17
  • 25