Instance Method

mapView(_:didChange:animated:)

Tells the delegate that the user tracking mode changed.

Declaration

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

Parameters

mapView

The map view whose user tracking mode changed.

mode

The mode used to track the user’s location.

animated

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.