Z-index of iOS MapKit user location annotation

后端 未结 9 2299
天命终不由人
天命终不由人 2020-12-13 07:12

I need to draw the current user annotation (the blue dot) on top of all other annotations. Right now it is getting drawn underneath my other annotations and getting hidden.

9条回答
  •  暖寄归人
    2020-12-13 07:32

    Another solution: setup annotation view layer's zPosition (annotationView.layer.zPosition) in:

    - (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views;

提交回复
热议问题