Instance Method


Tells the delegate that the user tracking mode changed.


optional func mapView(_ mapView: MKMapView, didChange mode: MKUserTrackingMode, animated: Bool)



The map view whose user tracking mode changed.


The mode used to track the user’s location.


If true, the change from the current mode to the new mode is animated; otherwise, it is not. This parameter affects only tracking mode changes. Changes to the user location or heading are always animated.

See Also

Tracking the User Location

func mapViewWillStartLocatingUser(MKMapView)

Tells the delegate that the map view will start tracking the user’s position.

func mapViewDidStopLocatingUser(MKMapView)

Tells the delegate that the map view stopped tracking the user’s location.

func mapView(MKMapView, didUpdate: MKUserLocation)

Tells the delegate that the location of the user was updated.

func mapView(MKMapView, didFailToLocateUserWithError: Error)

Tells the delegate that an attempt to locate the user’s position failed.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software