From documentation, the MKMapView property, Annotations, is a NSArray and not a NSMutableArray. So Annotations is supposed to be “immutable”. But MKMapView’s instant methods : addAnnotation and removeAnnotation are capable of changing the Annotations array. So on the surface there seems to be some inconsistencies. There must be something I have missed. Hope that somebody knowledgable could shed some light on this.
From documentation, the MKMapView property, Annotations, is a NSArray and not a NSMutableArray. So
Share
You’re meant to use
addAnnotationandremoveAnnotationto add/remove annotations instead of manipulating the annotations array directly.I assume both those functions do some processing as well as adding/removing annotations from the array.