title: UIScrollView breaks when using autolayout for size on iOS 8 / Xcode 6 GM Seed
body: <p>How do I get a Scroll View to work using autolayout to calculate its content size?</p>
  
  <p>It seems Xcode 6 will create a "UIView Encapsulated Layout Height" constraint whenever a Scroll View (with Autolayout) exists, and this constraint will forcibly set the height to the frame height (thus rendering the scroll functionality of a scroll view useless).</p>
  
  <p><img src="https://i.stack.imgur.com/HBmOk.png" alt="Layout broken - iPhone 5s Simulator in Xcode 6 GM Seed"></p>
  
  <p>Error:</p>
  
  <pre><code>2014-09-09 21:06:01.059 ScrollViewLayoutBreaking[24488:88731] Unable to simultaneously satisfy constraints.
      Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
  (
      "&lt;NSLayoutConstraint:0x7f9a19ebd150 V:[UIView:0x7f9a19ea7f90(530)]&gt;",
      "&lt;NSLayoutConstraint:0x7f9a19ec1370 V:[UIView:0x7f9a19ebd5e0(110)]&gt;",
      "&lt;NSLayoutConstraint:0x7f9a19ea9ee0 V:[_UILayoutGuide:0x7f9a19ec18d0]-(0)-[UIView:0x7f9a19ea7f90]&gt;",
      "&lt;NSLayoutConstraint:0x7f9a19ec1fa0 V:[UIView:0x7f9a19ea7f90]-(0)-[UIView:0x7f9a19ebd5e0]&gt;",
      "&lt;NSLayoutConstraint:0x7f9a19e8d270 V:[UIView:0x7f9a19ebd5e0]-(5)-[_UILayoutGuide:0x7f9a19ec2260]&gt;",
      "&lt;_UILayoutSupportConstraint:0x7f9a19ea0ac0 V:[_UILayoutGuide:0x7f9a19ec18d0(0)]&gt;",
      "&lt;_UILayoutSupportConstraint:0x7f9a19ea7380 V:|-(0)-[_UILayoutGuide:0x7f9a19ec18d0]   (Names: '|':UIScrollView:0x7f9a19ea76a0 )&gt;",
      "&lt;_UILayoutSupportConstraint:0x7f9a19e21d00 V:[_UILayoutGuide:0x7f9a19ec2260(0)]&gt;",
      "&lt;_UILayoutSupportConstraint:0x7f9a19e8a930 _UILayoutGuide:0x7f9a19ec2260.bottom == UIScrollView:0x7f9a19ea76a0.bottom&gt;",
      "&lt;NSLayoutConstraint:0x7f9a1c003f50 'UIView-Encapsulated-Layout-Height' V:[UIScrollView:0x7f9a19ea76a0(504)]&gt;"
  )
  
  Will attempt to recover by breaking constraint 
  &lt;NSLayoutConstraint:0x7f9a19ebd150 V:[UIView:0x7f9a19ea7f90(530)]&gt;
  
  Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
  The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in &lt;UIKit/UIView.h&gt; may also be helpful.
  </code></pre>
  
  <p>Edit: All views inside this Scroll View are autolayouted and already pinned to both the Scroll View top and bottom, as well as both sides. I am aware that failing to bind it in all four sides will fail to create a content size. The autolayout and scrolling are correct in iOS 7 / XCode 5, but the exact same code and storyboard break in iOS 8 / XCode 6.</p>