【发布时间】:2020-02-24 16:00:33
【问题描述】:
我可以在 MapKit 中进行注释的点击事件,但是如何在 MapKit 中进行注释的长按事件?
func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView) {
let annotation = view.annotation
let user = (annotation as! PointAnnotation).user
let me = mainStore.state.profile
if user === me {
return
}
let vc = ChatVC.storyBoardInstance
vc.user = user
self.navigationController?.pushViewController(vc, animated: true)
}
这是关于点击事件的代码。
【问题讨论】:
-
感谢您的评论,但我认为这是我正在使用 MapKit 的 Google Map 的解决方案
-
糟糕,我的错,对不起。
-
np,你认为 MapKit 有可能吗?
-
我没用过 MapKit,但是在 Google 上快速搜索一下,medium.com/@calmone/…
标签: swift annotations mapkit