MKUserLocation Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/MapKit.framework
Availability
Available in iOS 3.0 and later.
Companion guide
Declared in
MKUserLocation.h
Related sample code

Overview

The MKUserLocation class defines a specific type of annotation that identifies the user’s current location. You do not create instances of this class directly. Instead, you retrieve an existing MKUserLocation object from the userLocation property of the map view displayed in your app.

Tasks

Determining the User’s Position

Accessing the User Annotation Text

Properties

heading

The heading of the user location. (read-only)

@property(readonly, nonatomic) CLHeading *heading
Discussion

This property is nil if the user location tracking mode is not MKUserTrackingModeFollowWithHeading.

Availability
  • Available in iOS 5.0 and later.
Declared In
MKUserLocation.h

location

The current location of the device. (read-only)

@property(readonly, nonatomic) CLLocation *location
Discussion

This property contains nil if the map view is not currently showing the user location or if the user’s location has not yet been determined.

Availability
  • Available in iOS 3.0 and later.
Declared In
MKUserLocation.h

subtitle

The subtitle to display for the user location annotation.

@property(nonatomic, copy) NSString *subtitle
Availability
  • Available in iOS 3.0 and later.
Declared In
MKUserLocation.h

title

The title to display for the user location annotation.

@property(nonatomic, copy) NSString *title
Availability
  • Available in iOS 3.0 and later.
Declared In
MKUserLocation.h

updating

A Boolean value indicating whether the user’s location is currently being updated. (read-only)

@property(readonly, nonatomic, getter=isUpdating) BOOL updating
Availability
  • Available in iOS 3.0 and later.
Declared In
MKUserLocation.h