iOS Developer Library

Developer

MapKit Framework Reference MKUserTrackingBarButtonItem Class Reference

Options
Deployment Target:

On This Page
Language:

MKUserTrackingBarButtonItem

Inherits From


Conforms To


Import Statement


Swift

import MapKit

Objective-C

@import MapKit;

Availability


Available in iOS 5.0 and later

AnMKUserTrackingBarButtonItem object is a specialized bar button item that allows the user to toggle through the user tracking modes. For example, when the user taps the button, the map view toggles between tracking the user with and without heading. The button also reflects the current user tracking mode if set elsewhere. This bar button item is associated to a single map view.

  • init(mapView:) - initWithMapView: Designated Initializer

    Initializes a newly created bar button item with the specified map view.

    Declaration

    Swift

    init!(mapView mapView: MKMapView!)

    Objective-C

    - (instancetype)initWithMapView:(MKMapView *)mapView

    Parameters

    mapView

    The map view used by this bar button item.

    Return Value

    The initialized bar button item.

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in iOS 5.0 and later

  • mapView mapView Property

    The map view associated with this bar button item.

    Declaration

    Swift

    var mapView: MKMapView!

    Objective-C

    @property(nonatomic, strong) MKMapView *mapView

    Import Statement

    Objective-C

    @import MapKit;

    Swift

    import MapKit

    Availability

    Available in iOS 5.0 and later