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

# MKUserTrackingButton

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

```
class MKUserTrackingButton
```

## Overview

Use this class when you need a standard button that you can incorporate into your view hierarchy. 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.

## Topics

### Creating a user tracking button

[`+  userTrackingButtonWithMapView:`](/documentation/MapKit/MKUserTrackingButton/init(mapView:))

Initializes the button with the map view that it should control.

### Getting the parent map

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

The map view associated with the button.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

[`CALayerDelegate`](/documentation/QuartzCore/CALayerDelegate)

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

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

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

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

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

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

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

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

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

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

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

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

[`CMBodyIdentifiable`](/documentation/CoreMotion/CMBodyIdentifiable)

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

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

[`CLBodyIdentifiable`](/documentation/CoreLocation/CLBodyIdentifiable)

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

[`UITraitChangeObservable-67e94`](/documentation/UIKit/UITraitChangeObservable-67e94)

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

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

### Inherits From

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

---

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)