ios - Mapkit 标注附件按钮激活

标签 ios swift mapkit mapkitannotation

我正在使用 MapKit 来显示带有许多注释的 map 。每个注释都有一个带有 UIButton 的标注。大多数情况下一切都工作正常,但只要 UIButton 后面有注释,就不可能激活它。我希望 UIButton 可以激活,无论背景注释如何。有没有办法忽略标注后面的注释?

最佳答案

我找到了解决此问题的适当方法:

(void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view {
[view.superview bringSubviewToFront:view];
}

https://github.com/danielbarela/ios-map-callout-test/issues/1

关于ios - Mapkit 标注附件按钮激活,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57017307/

相关文章:

ios - 数据未解析我想将数据解析为字典,然后解析为数组,然后迭代它

ios - 如何获取 MobileVLCKit 的缓冲区百分比?

iphone - 从邮政编码(邮政编码)或城市/州获取坐标

iphone - 展开 UITableViewstylePlain 中的 UITableView 单元格

ios - 迁移到 Xcode 8 和 Swift 3.0 时 Xcode Healthkit 授权函数错误

ios - 快速移动另一个屏幕时覆盖屏幕

objective-c - 可以将 Obj-C AXObserverCallback 转换为 Swift 吗?

swift - 使用 Swift 遍历 firestore 中的对象字段

ios - 如何在我的应用程序 View 中显示 map ?

ios - MKAnnotation 的详细信息 ViewController