开发者

MKMapView removeAnnotation is not removing the selected annotation

开发者 https://www.devze.com 2023-03-24 01:29 出处:网络
When I call removeAnnotation and pass it a pointer to the annotat开发者_StackOverflowion I had added, it is not removing the annotation...Is this because it had made a copy of the annotation when I ad

When I call removeAnnotation and pass it a pointer to the annotat开发者_StackOverflowion I had added, it is not removing the annotation... Is this because it had made a copy of the annotation when I added it?

Thanks Deshawn


You could try this

nsarray *oldAnnotations=[self.mapview annotations];
[self.mapview removeAnnotations:oldAnnotations];
0

精彩评论

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