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

# mapView(_:annotationView:didChange:fromOldState:)

Tells the delegate when the drag state of one of its annotation views changes.

```
optional func mapView(_ mapView: MKMapView, annotationView view: MKAnnotationView, didChange newState: MKAnnotationView.DragState, fromOldState oldState: MKAnnotationView.DragState)
```

## Parameters

`mapView`

The map view containing the annotation view.

`view`

The annotation view whose drag state changed.

`newState`

The new drag state of the annotation view.

`oldState`

The previous drag state of the annotation view.

## Discussion

The drag state typically changes in response to user interactions with the annotation view. However, the annotation view itself is responsible for changing that state as well.

---

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)