Instance Method

mapView(_:didAdd:)

Tells the delegate that one or more annotation views were added to the map.

Declaration

optional func mapView(_ mapView: MKMapView, didAdd views: [MKAnnotationView])

Parameters

mapView

The map view that added the annotation views.

views

An array of MKAnnotationView objects representing the views that were added.

Discussion

By the time this method is called, the specified views are already added to the map.

See Also

Managing Annotation Views

func mapView(MKMapView, viewFor: MKAnnotation) -> MKAnnotationView?

Returns the view associated with the specified annotation object.

func mapView(MKMapView, annotationView: MKAnnotationView, calloutAccessoryControlTapped: UIControl)

Tells the delegate that the user tapped one of the annotation view’s accessory buttons.

func mapView(MKMapView, clusterAnnotationForMemberAnnotations: [MKAnnotation]) -> MKClusterAnnotation

Asks the delegate to provide a cluster annotation object for the specified annotations.