In the MKMapViewDelegate, the code in the method mapView:didSelectAnnotationView is executed AFTER the selection of the annotation view (and therefore after the callout bubble appears). BUT I need to execute some code BEFORE the callout bubble appears. So, I would need something like mapView:*Will*SelectAnnotationView ... that doesn't exist. How can I do ? Thank you !
Asked
Active
Viewed 160 times
1
-
Why can't it go in the didSelectAnnotationView? – Lee Armstrong Apr 19 '12 at 10:15
-
Because I need to update the annotation BEFORE the callout bubble is displayed. If not, the callout bubble displays title and subtitle that doesn't match the actual situation. – Gilles Risolo Apr 19 '12 at 10:53
-
1Why not update the text on display, or even before that in the didAddannotations – Lee Armstrong Apr 19 '12 at 10:54
-
You need to edit the annotation when you add it to the map, for responsiveness. There's no way you will get such a method. – Cyril Godefroy Apr 19 '12 at 15:15
1 Answers
-1
You can use this method to do the required functionality:
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control;

Akshay
- 2,973
- 6
- 43
- 75

nisha vishwakarma
- 149
- 4
-
That won't do it either, that isn't called until someone hits the button on the bubble!!!! – Lee Armstrong Apr 19 '12 at 10:14