MKMapView annotations changing/losing order?

后端 未结 2 2082
情书的邮戳
情书的邮戳 2020-11-29 10:57

I have a map view with annotations, and these annotations display a callout. When the callout\'s disclosure detail button is clicked, it segues into a new view.

My

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-29 11:15

    @Anna, you state you should not be concerned for the order of the annotations. That's not true in my case. Some annotationviews might overlap, and I always need a specific one to be on the top of the two overlapping views. So the order DO makes sense for the annotations, as I hope the - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation gets called in the same order as i added the annotations.

    EDIT: and the solution is here :-)

提交回复
热议问题