title: UIScrollView auto layout - content size not set correctly
body: <p>I've seen a lot of Stack Overflow threads about this topic (and the <a href="https://developer.apple.com/library/ios/#releasenotes/General/RN-iOSSDK-6_0/" rel="nofollow noreferrer">iOS 6 release notes</a>), but none have seemed to help me here, or I can't understand them. What I have is a scroll view of size (244, 46) that I want to scroll to twice its width with paging. </p>
  
  <p><img src="https://i.stack.imgur.com/Or0jd.png" alt="My storyboard, showing the list of buttons and the list of constraints, along with the purple constraint that won&#39;t delete"></p>
  
  <p>In my storyboard I've laid out the scroll view and its subviews (a row of <code>UIButtons</code>) - I set their origins but removed all the constraints saying "Leading space to <code>superview</code>." I replaced them with "Leading space to button" - the horizontal spacing between successive buttons. In code, I set the buttons' translatesAutoresizingMaskIntoConstraints to NO.</p>
  
  <p>I can't get the scroll view to scroll, however. It just bounces to show that there is something on the right side of the scroll view's bounds, just out of reach. Is there anything I'm doing wrong, or something else I need to try to get this to work? </p>
  
  <p>Oh, and there was also a "<em>Trailing space to superview</em>" constraint on the last visible button in Interface Builder (not the last button in the row), and a "Leading space to <code>superview</code>" constraint on the first button that wouldn't stay deleted (see the purple constraint in the image). They annoyingly just popped up in a different spot in the list! Why does this happen, and why isn't the content size being set properly?</p>
  
  <p>Thanks for your time!</p>