I do almost something similar. Since I don't like the normal callout on the map, I created a custom callout. Put MKMapViewDelegate in your header and declare the method (void)mapView:(MKMapView *)aMapView didSelectAnnotationView:(MKAnnotationView *)viewin the implementation file. In this method, I create a new view that displays the contents of the annotation. Add UIButton to close this custom view.
- (void)deselectAnnotation {
selectedAnnotation = mapView.selectedAnnotations;
for (int i = 0;i < selectedAnnotation.count; i++) {
[mapView deselectAnnotation:[selectedAnnotation objectAtIndex:i] animated:NO];
}
}
source
share