How to remove all annotations from MKMapView without removing the blue dot?

后端 未结 7 1022
青春惊慌失措
青春惊慌失措 2020-12-07 23:16

I would like to remove all annotations from my mapview without the blue dot of my position. When I call:

[mapView removeAnnotations:mapView.annotations];
         


        
7条回答
  •  生来不讨喜
    2020-12-07 23:29

    shortest way to clean all annotations and preserving MKUserLocation class annotation

    [self.mapView removeAnnotations:self.mapView.annotations];
    

提交回复
热议问题