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 bounce area - Similar to Foursquare, see example:
My current default header implementation (grey bounce area when dragging down)
How do I make the map view in the header adapt to the available header space on top when dragging the table down?
I am using the UIScrollView delegate as mentioned in the comments and then resize the map view frame as it follows.
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
CGRect frame = worldmap.frame;
frame.size.height -= scrollView.contentOffset.y;
worldmap.frame = frame;
}
... but it's not quite reacting correctly and performs poorly. How do I set the new size of the map frame correctly?