title: Resize UIScrollView's height to screen height?
body: <p><a href="https://i.stack.imgur.com/lF0O3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lF0O3.png" alt="enter image description here"></a></p>
  
  <p>Black - screen frame/size</p>
  
  <p>Red - default UIScrollView's frame/size</p>
  
  <p>Yellow - my button.</p>
  
  <p>I want to always keep that button at the bottom. So e.g. on 3.5in screen, scrolling is available and button is at the bottom, no problem. Now, when we move to 5.5in screen, it becomes like in this image, button is not at the bottom anymore. What I am trying to do is change UIScrollView's height, but it does not work:</p>
  
  <pre><code>if(self.view.frame.height &gt; contentView.frame.height)
      {
          print("fixing scroll view")
          contentView.frame = CGRectMake(0, 0, self.view.frame.width, self.view.frame.height * 2)
          scrollView.contentSize = CGSizeMake(self.view.frame.width, self.view.frame.height * 2)
      }
  </code></pre>
  
  <p><code>self.view.frame.height * 2</code> is just for testing. What could be wrong?</p>