title: Expand UITableView Header View to Bounce Area When Pulling Down
body: <p>I have implemented a MKMapView in the header area and I'd like to expand it fully to the top even when you  drag down the table into the <em>bounce area</em> - Similar to Foursquare, see example:</p>
  
  <p><img src="https://i.stack.imgur.com/yxUEA.jpg" alt="Foursquare Example"></p>
  
  <p>My current default header implementation (grey bounce area when dragging down)</p>
  
  <p><img src="https://i.stack.imgur.com/nKmPr.jpg" alt="Default Header"></p>
  
  <p>How do I make the map view in the header adapt to the available header space on top when dragging the table down?</p>
  
  <p>I am using the UIScrollView delegate as mentioned in the comments and then resize the map view frame as it follows.</p>
  
  <pre><code>- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
      CGRect frame = worldmap.frame;
      frame.size.height -= scrollView.contentOffset.y;
      worldmap.frame = frame;  
  } 
  </code></pre>
  
  <p>... but it's not quite reacting correctly and performs poorly. How do I set the new size of the map frame correctly?</p>