相关疑难解决方法(0)

iOS MapKit用户位置注释的Z-index

我需要在所有其他注释之上绘制当前用户注释(蓝点).现在它正在我的其他注释下面被隐藏起来.我想调整此注释视图的z-index(蓝点)并将其置于顶部,有人知道如何吗?

更新: 所以我现在可以处理MKUserLocationView,但我该如何推进呢?

- (void) mapView:(MKMapView *)aMapView didAddAnnotationViews:(NSArray *)views {
    for (MKAnnotationView *view in views) {
        if ([[view annotation] isKindOfClass:[MKUserLocation class]]) {
            // How do I bring this view to the front of all other annotations?
            // [???? bringSubviewToFront:????];
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

objective-c mapkit ios

32
推荐指数
4
解决办法
1万
查看次数

标签 统计

ios ×1

mapkit ×1

objective-c ×1