Contents

MKMapViewDelegate

Optional methods that you use to receive map-related update messages.

Declaration

@MainActor protocol MKMapViewDelegate : NSObjectProtocol

Overview

Because many map operations require the MKMapView class to load data asynchronously, the map view calls these methods to notify your app when specific operations complete. The map view also uses these methods to request annotation and overlay views, and to manage interactions with those views.

Before releasing an MKMapView object that you set a delegate for, remember to set that object’s delegate property to nil. MapKit calls all of your delegate methods on the app’s main thread.

Topics

Responding to map position changes

Loading the map data

Tracking the user’s location

Managing annotation views

Dragging an annotation view

Selecting annotations and annotations views

Managing the display of overlays

See Also

Customizing the map view behavior