<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 9.2.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MKMapViewDelegate/mapView(_:didChange:animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:objc(pl)MKMapViewDelegate(im)mapView:didChangeUserTrackingMode:animated:"
  },
  "title" : "mapView(_:didChange:animated:)"
}
-->

# mapView(_:didChange:animated:)

Tells the delegate when the user-tracking mode changes.

```
optional func mapView(_ mapView: MKMapView, didChange mode: MKUserTrackingMode, animated: Bool)
```

## Parameters

`mapView`

The map view where the user-tracking mode changes.

`mode`

The mode to use for tracking the user’s location.

`animated`

If <doc://com.apple.documentation/documentation/Swift/true>, the map animates the change from the current mode to the new mode; otherwise, the map doesn’t animate the change. This parameter affects only tracking-mode changes. The map animates all changes to the user’s location and heading.

## See Also

[`setUserTrackingMode(_:animated:)`](/documentation/MapKit/MKMapView/setUserTrackingMode(_:animated:))

Sets the mode to use for tracking the user’s location, with optional animation.



---

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)