开发者

How to refresh MKMapView in the appDelegate

开发者 https://www.devze.com 2023-02-01 18:42 出处:网络
Initially when I learned how to write a multi view application I found this handy way to reload the UITableView

Initially when I learned how to write a multi view application I found this handy way to reload the UITableView

[randomTableView reloadData];

But when I want to reload an MKMapView how would I do this exactly? The scenario is this:

I pick an address and the map loads (hits all the usual controller methods - life is good) Next I go "back" and click another address (yet the map is still showing the previous 开发者_如何学Golocation)

Thank you in advance!


You have to set the MKMapView's center coordinate (setCenterCoordinate:animated:) or its region (setRegion:animated:). You probably do it already with the first call to the map -- you'll just need to do it again.

0

精彩评论

暂无评论...
验证码 换一张
取 消