开发者

How to remove annotations added as MKAnnotationView objects

开发者 https://www.devze.com 2023-01-06 09:26 出处:网络
I am new to using MapKit framework. I am adding an image to MKAnnotationView object at specific lat-long pair on map, say at (latA, longA).

I am new to using MapKit framework.

I am adding an image to MKAnnotationView object at specific lat-long pair on map, say at (latA, longA).

For the next iteration, i need to remo开发者_JS百科ve the annotation added and add new annotation at different lat-long pair, say at (latB, longB).

Let me know of any help.

Thanks @dity@


Step1: Remove the annotation [self.mapView removeAnnotation:annotation];

Step2: Change/Recreate the annotation, and add it back [self.mapView addAnnotation:annotation]

0

精彩评论

暂无评论...
验证码 换一张
取 消