MKMapView refresh after pin moves

slatvick picture slatvick · Jul 27, 2009 · Viewed 17.2k times · Source

A custom AnnotationView is updated with new coordinates. But the problem is that it visually updates only after some manipulations with MKMapView, e.g. zooming or moving. What should I do to manually update visual position on a map?

PS. I've tried to change region to current map's region. But it does change zoom. It's strange.

[mapView setRegion:[mapView region] animated:YES];

Answer

slatvick picture slatvick · Jul 30, 2009

I am a little shoked after hours of research. The answer is just:

[mapView setCenterCoordinate:mapView.region.center animated:NO];

Do not ask me why, but it updates a mapview and it's what i was need.