How to z-order MKAnnotationViews?

I tried two methods found in these stackoverflow posts with no luck: post , post b .

... Methods: a to bring the view forward from the supervisor, b to set the z position of the view layer.

Does anyone know a third way?

+3


source to share


1 answer


Try to set anchorPointZ

at level MKAnnotationView

. Note that higher values ​​place the view lower in stacking order.



This works on macOS 10.13. I haven't tested iOS 11 yet, but MapKit is nearly identical on both platforms.

0


source







All Articles