<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MKUserTrackingBarButtonItem",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MKUserTrackingBarButtonItem"
  },
  "title" : "MKUserTrackingBarButtonItem"
}
-->

# MKUserTrackingBarButtonItem

A specialized bar button item that allows the user to toggle whether the map tracks to the heading the user is facing.

```
class MKUserTrackingBarButtonItem
```

## Overview

Tapping the button lets the user toggles between modes for displaying the map with and without the current heading applied. The button also reflects the current user tracking mode if set elsewhere. This bar button item is associated to a single map view.

## Topics

### Creating a user tracking bar button item

[`-  initWithMapView:`](/documentation/MapKit/MKUserTrackingBarButtonItem/init(mapView:))

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

### Accessing the owning map

[`mapView`](/documentation/MapKit/MKUserTrackingBarButtonItem/mapView)

The map view associated with this bar button item.

## Relationships

### Conforms To

[`UIPopoverPresentationControllerSourceItem`](/documentation/UIKit/UIPopoverPresentationControllerSourceItem)

[`UIAccessibilityIdentification`](/documentation/UIKit/UIAccessibilityIdentification)

[`UISpringLoadedInteractionSupporting`](/documentation/UIKit/UISpringLoadedInteractionSupporting)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`UIAppearance`](/documentation/UIKit/UIAppearance)

[`Equatable`](/documentation/Swift/Equatable)

### Inherits From

[`UIBarButtonItem`](/documentation/UIKit/UIBarButtonItem)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)