To add annotations to MapKit, you need to implement an annotation delegate that implements the MKAnnotation protocol. When you add an annotation to the map, you instantiate the Annotation Delegate object and then add it to MKMapView. MKAnnotation includes a position property that you can request to locate the annotation:
@interface AnnotationDelegate : NSObject <MKAnnotation> {
CLLocationCoordinate2D coordinate;
}
@property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
@end
To add your annotation to the map:
AnnotationDelegate * annotationDelegate = [[[AnnotationDelegate alloc] init] autorelease];
[mapView addAnnotation:annotationDelegate];
, calloutAccessoryControlTapped , MKAnnotationView.nnation position:
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
AnnotationDelegate * delegate = (AnnotationDelegate*)view.annotation;
}