Instance Property

userTrackingMode

The mode used to track the user location.

Declaration

var userTrackingMode: MKUserTrackingMode { get set }

Discussion

Possible values are described in MKUserTrackingMode.

Setting the tracking mode to follow or followWithHeading causes the map view to center the map on that location and begin tracking the user’s location. If the map is zoomed out, the map view automatically zooms in on the user’s location, effectively changing the current visible region.

See Also

Displaying the User’s Location

var showsUserLocation: Bool

A Boolean value indicating whether the map should try to display the user’s location.

var isUserLocationVisible: Bool

A Boolean value indicating whether the device’s current location is visible in the map view.

var userLocation: MKUserLocation

The annotation object representing the user’s current location.

func setUserTrackingMode(MKUserTrackingMode, animated: Bool)

Sets the mode used to track the user location with optional animation.