Sometimes strange artifact appears when [mapView selectAnnotation];

不问归期 提交于 2019-12-12 17:22:37

问题


[_mapView selectAnnotation:sannotation animated:YES];

It appears not always, so I don't understand what's the reason for it.

How to fix it?


回答1:


Before selecting any annotation deselect all annotations on mapView.

for (id<MKAnnotation> annotation in mapView.annotations) 
  [mymap deselectAnnotation:annotation animated:NO];

I had same issue when along with default callout, I had implemented custom callouts. Though it is not a perfect solution it served the purpose.



来源:https://stackoverflow.com/questions/9180317/sometimes-strange-artifact-appears-when-mapview-selectannotation

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