title: Problems with UIScrollView when changing orientation , iOS
body: <p>I have an <code>UIScrollView</code> , where i show various settings for my application.</p>
  
  <p>I created the <code>UIScrollView</code> from the builder , i added it as a sub view to my View and from the size inspector of the builder i placed it in position Y: -10 , to show just under my navigation bar. In my code i just added </p>
  
  <pre><code>self.scrollView.contentSize =CGSizeMake(self.scrollView.frame.size.width,1000);
  </code></pre>
  
  <p>and everything works as expected.</p>
  
  <p>My problem starts , when i try to rotate the screen. Two major problems arise.</p>
  
  <p>The <strong>first</strong> one is that , the start of the UIScrollView is not the same. It "starts" from a lower place than it should , hiding some options. <em>(image below)</em></p>
  
  <p>The <strong>second</strong> one is that , the width of the UIScrollView is not automatically adjusted to the new screen orientation and is the same as before. <em>(image below)</em></p>
  
  <p>So what exactly should i do , to have a nice result on both orientations?</p>
  
  <p>I attach images with both orientations. The first one is the portrait which "works" as expected , the second one is the landscape where the problems arise.</p>
  
  <p><img src="https://i.stack.imgur.com/wngtL.png" alt="Portrait mode"></p>
  
  <p><img src="https://i.stack.imgur.com/n2ES8.png" alt="Landscape mode"></p>