Instance Method

mapView(_:didSelect:)

Tells the delegate that one of its annotation views was selected.

Declaration

optional func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView)

Parameters

mapView

The map view containing the annotation view.

view

The annotation view that was selected.

Discussion

You can use this method to track changes in the selection state of annotation views.

See Also

Selecting Annotation Views

func mapView(MKMapView, didDeselect: MKAnnotationView)

Tells the delegate that one of its annotation views was deselected.