You can use a bunch of different techniques here.
For example, you could keep an ivar for each annotationView and do this:
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control {
if (view == myFirstAnnotationView) {
//do something
}
if (view == mySecondAnnotationView) {
//do something
}
if (view == myThirdAnnotationView) {
//do something
}
}
Or, you could use the tag value of the annotation view.
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control {
if ([view.tag isEqualToString@"one"]) {
}
if ([view.tag isEqualToString@"two"]) {
}
}
Or, you could subclass MKAnnotationView to add some behavior to it.
- (void)mapView:(MKMapView *)mapView annotationView:(MyMKAnnotationViewSubclass *)view calloutAccessoryControlTapped:(UIControl *)control {
[view doAMethodIMadeWhenISubclassed];
}
None, of these is a complete solution, and it would be hard to provide one without beter understanding your application and design, but what they all have in common is changing the annotationView before you add it to the map in order to decide what to do after the delegate callback happens. I hope this leads you down the right path.