Sometimes strange artifact appears when [mapView s

2019-07-18 21:56发布

[_mapView selectAnnotation:sannotation animated:YES];

Screenshot

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

How to fix it?

1条回答
啃猪蹄的小仙女
2楼-- · 2019-07-18 22:34

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.

查看更多
登录 后发表回答