Suppose I have an image saved on the iPhone, and a class I called MKAnnotationDelegate
that implements the MKAnnotation
protocol.
I can display annotations on an map view using that class, but can't figure out how to set a callout acccessory and put in an image.
So I've implemented the MKMapiewDelegate
protocol to, and gave the class a UIImage
property, and defined the
-(MKAnnotationView *) mapView:(MKMapView *)mapView
viewForAnnotation:(id<MKAnnotation>)annotation;
and I've put in these two lines:
annotationView.canShowCallout = YES;
[(UIImageView *)annotationView.rightCalloutAccessoryView setImage: _image];
but still can't figure out what to do to get the image in there .