title: UIScrollview with Autolayout Content Size in Landscape
body: <p>I'm trying to show a simple settings screen in my app and I'm using Autolayout.  Since my app supports landscape, and the settings controls don't quite fit vertically when the phone is landscape, I added a UIScrollview. </p>
  
  <p>It seems that the combination of UIScrollview and Autolayout is a common question here and elsewhere.  I've read a few articles on it, and from what it can tell, it seems that a good way to go for what I'm trying to do is to put my various controls within a view, like a "contentView" with constraints aligned in that view.  Then have that contentView be the sole subview of the UIScrollView.  I have the contentView with constraints tied to the edges of the UIScrollView.  </p>
  
  <pre><code>UINavigationView -&gt; UIScrollview -&gt; contentView (UIView) -&gt; Control Subviews
  </code></pre>
  
  <p><img src="https://i.imgur.com/kbR0OUX.png" alt="xib"></p>
  
  <p>It works fine in portrait, even if I add content in my contentView that requires scrolling to see, but when I go to landscape, it doesn't let me scroll down far enough. It's like the content size gets reset to the frame of the visible area (or the frame of the navigation controller superview) when I rotate. </p>
  
  <p><img src="https://i.imgur.com/MZ1OdJs.png" alt="simulator"></p>
  
  <p>I'm wondering if I need to check for rotation and then set the content size again at that time?  If so, is there a way to get that size dynamically from the view (contentView)? </p>
  
  <p>Thanks for any help you can offer!
  Jim</p>