But there is a catch to get benvolioT's solution to work, the code
for (idcurrentAnnotation in mapView.annotations) { if ([currentAnnotation isEqual:annotationToSelect]) { [mapView selectAnnotation:currentAnnotation animated:FALSE]; } } should be called from – (void)mapViewDidFinishLoadingMap:(MKMapView *)mapView, and nowhere else.
The sequence in which the various methods like viewWillAppear, viewDidAppear of UIViewController and the – (void)mapViewDidFinishLoadingMap:(MKMapView *)mapView is called is different between the first time the map is loaded with one particular location and the subsequent times the map is displayed with the same location. This is a bit tricky.
via How to trigger MKAnnotationView’s callout view without touching the pin? – Stack Overflow.
How to trigger MKAnnotationView’s callout view without touching the pin? – Stack Overflow
Subscribe
Subscribe to our e-mail newsletter to receive updates.
No comments yet.