title: Autolayout constraints not being applied iOS
body: <p>I am making an app with a UIScrollView with some UIButtons in it along with some UILabels. I'm trying it the way outlined <a href="http://www.apeth.com/iOSBook/ch20.html" rel="nofollow noreferrer">here</a> on apeth.com as was referenced on another SO question. My implementation does not set a contentSize or use a contentView as the scrollView should adjust to the size of it's subviews. </p>
  
  <p>The problem is that the UIButtons and UILabels seem to not have the constraints applied. I had to bunch up my UIButtons and UILabels to fit on the Storyboard so I could see them like so. However, they appear just like this when I run the app. The constraints should work at runtime, but it just seems like they are using the Storyboard rough layout. </p>
  
  <p><a href="https://i.stack.imgur.com/uLnWs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uLnWs.png" alt="UIViews bunched up at end of scrollview in Storyboard"></a></p>
  
  <p>And this is how it looks on the 5S</p>
  
  <p><a href="https://i.stack.imgur.com/p1rhV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p1rhV.png" alt="UIViews bunched up at end of scrollview on device"></a></p>
  
  <p>The UIScrollview constraints to superview are
         0
  0 UIScrollView 0
         0</p>
  
  <p>The subviews of UIScrollview are as follows</p>
  
  <blockquote>
    <p>Subviews - Center vertical</p>
    
    <p>16-firstButton-4-firstLabel-16-secondButton-4-secondLabel-etc...-16-lastButton-4-lastLabel-16</p>
  </blockquote>
  
  <p>EDIT: Followed the suggestion in comment and added the label to the button itself to make it simpler and set contentView to 728. Now, I have the problem of the button truncating the button text, which is awful for localization purposes. Please advise. </p>
  
  <p><a href="https://i.stack.imgur.com/kLW6f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kLW6f.png" alt="updated to suggestion with contentView with truncated labels"></a></p>