How can I detect which annotation was selected in MapView

前端 未结 2 779
名媛妹妹
名媛妹妹 2021-02-14 09:52

I\'ve made a few annotations inside the Map and when I tap on them I see some informations and I have a button that opens Maps and with the right information that I can\'t take

2条回答
  •  不思量自难忘°
    2021-02-14 10:22

    For Swift 4

    func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView) {
        var selectedAnnotation = view.annotation
    }
    

提交回复
热议问题