I have a callout on an MKAnnotation. The accessory on the callout should, when tapped, change the MKAnnotationView’s image. Is there a way to change this, without recreating the MKAnnotation? The reason I ask is that I would like to change the image, without removing the callout. But obviously, the callout gets removed when I remove the annotation. So how do I simply change the image, so that the callout does not get removed?
Share
Your MKMapViewDelegate has the methods
mapView:didSelectAnnotationView:andmapView:didDeselectAnnotationView:. You are passed the MKAnnotationView here, and you can modify it here. Put code like this in your delegate: