title: Remove extra bottom padding from horizontal UIScrollView
body: <p>I have created a horizontally scrolling <code>UIScrollView</code> which contains <code>UIButton</code>s. I want the <code>UIButton</code>s to fill the height of the <code>UIScrollView</code>, so I've set up auto layout for the buttons: the top space and bottom space are set to Superview with a constant of 0. In Interface Builder it shows the correct <code>UIScrollView</code> frame size, but the buttons are 10 pixels too small - there's extra padding underneath the buttons. The scroll view's height is 44 pixels, the buttons height are 34 pixels.</p>
  
  <p>I thought this might be because it preserves some space to show the horizontal scroll bar. But I have disabled Shows Horizontal Indicator in IB. I then attempted to programmatically remove the space via the code below but that didn't change anything. </p>
  
  <pre><code>self.automaticallyAdjustsScrollViewInsets = false
  scrollView.contentInset = UIEdgeInsetsZero
  scrollView.scrollIndicatorInsets = UIEdgeInsetsZero
  scrollView.contentOffset = CGPointMake(0, 0)
  </code></pre>
  
  <p>EDIT: It must not be related to preserving space for a scroll bar. The scroll view's height is equal to the height of another button. When I change that button's height to change the scroll view height, the amount of bottom spacing increases. The buttons are always 34pt tall.</p>
  
  <p>Another thing I tried was to remove the bottom space and add a fixed height constraint, but this results in an ambiguous scroll view height.</p>
  
  <p>How can this padding be removed so that the buttons are the exact height of the scroll view's height?</p>
  
  <p>Interface Builder:<br>
  <img src="https://i.stack.imgur.com/ABtHq.png" alt="enter image description here"></p>
  
  <p>Running the app:<br>
  <img src="https://i.stack.imgur.com/t2pZL.png" alt="enter image description here"><br>
  (I temporarily unhid the scroll bar to show it here)<br>
  I need the white button to stretch in height to cover up the gray area beneath it.</p>