taozhuo
3/29/2015 - 10:45 PM

Remove all annotations from MKMapView

Remove all annotations from MKMapView

id userLocation = [_mapView userLocation];
[_mapView removeAnnotations:_mapView.annotations]; //this also removes user location
if (userLocation != nil) {
    [_mapView addAnnotation:userLocation];   //add user location back
}