MKMapView removeAnnotation is not removing the selected annotation

自古美人都是妖i 提交于 2019-12-14 01:52:45

问题


When I call removeAnnotation and pass it a pointer to the annotation 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


回答1:


You could try this

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


来源:https://stackoverflow.com/questions/6876662/mkmapview-removeannotation-is-not-removing-the-selected-annotation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!