How to define the order of overlapping MKAnnotationViews?

后端 未结 7 1400
谎友^
谎友^ 2020-11-30 06:29

I have several MKAnnotations (and their corresponding views) in my map, and it sometimes gets really crowded. Now, the annotations in my app come in two flavors: some are bo

7条回答
  •  春和景丽
    2020-11-30 07:14

    I'm finding that this reordering the annotation views causes the callout that pops up when one is clicked to no longer be on top of all the annotations. I've even tried refining it so that instead of bringSubviewToFront and sendSubviewToBack, I use insertSubview:aboveSubview and insertSubview:belowSubview: where the second argument is the first annotationView in the list. This would seem to cause much less front to back scattering, but the call outs still pop up under some annotations.

提交回复
热议问题