I'm adding several annotations to a MapView and using a custom image instead of the default pins. I am using the viewForAnnotation
delegate method to set the custom image like this:
view.image = [UIImage imageNamed:@"placemark.png"];
And I've also tried:
[(MKPinAnnotationView *)view setImage:[UIImage imageNamed:@"placemark.png"]];
Now, these both set the image just fine. But when an annotation is either tapped or the mapType
changes to Satellite or Hybrid, it resets back to the red pin image. What am I missing?
Don't use MKPinAnnotationView - just use MKAnnotationView.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With