I have a MKMapView with lots of annotations. When I tap on an annotation, the contact details(ABPersonViewController) of the annotation is pushed. In this class I have an option to delete the contact. As the contact is deleted from the addressbook, at the same time I need to remove the annotation from the mapview too.
As the delete button is tapped, the contact is removed from the addressbook, and the ABPersonViewController class is popped from the navigation stack. Now the user sees the mapview. But it should be without the annotation(contact) which was removed.
How can I do this.
Get the annotations from the mapview using the
annotationproperty. Then iterate through the annotation list to get the particular annotation then use themethod to remove the annotation. I hope it will take care of your problem.