Expand UITableView Header View to Bounce Area When Pulling Down

前端 未结 4 535
孤独总比滥情好
孤独总比滥情好 2021-02-03 11:10

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 Fours

4条回答
  •  感情败类
    2021-02-03 11:43

    Make your headerView frame very long, then center the map in a region that allows you to view the interesting area in bottom of the map.

    Edit: I've notice that the pin in the Foursquare example stays in center of the map. This means that you probably should use UIScrollViewDelegate to use didScroll method and change the frame of the map dynamically during the scroll. You should also center the map in the pin's region while scrolling.

提交回复
热议问题