<!--
{
  "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/MKAnnotationView/dragState-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MKAnnotationView(py)dragState"
  },
  "title" : "dragState"
}
-->

# dragState

The drag state of the annotation view.

```
var dragState: MKAnnotationView.DragState { get set }
```

## Discussion

If your app runs in iOS 4.2 or later, override the [`setDragState(_:animated:)`](/documentation/MapKit/MKAnnotationView/setDragState(_:animated:)) method and use it to manage the drag state instead.

To support drag operations, override the implementation of this property and update the drag state at the following times:

- When the drag state changes to [`MKAnnotationView.DragState.starting`](/documentation/MapKit/MKAnnotationView/DragState-swift.enum/starting), set the state to [`MKAnnotationView.DragState.dragging`](/documentation/MapKit/MKAnnotationView/DragState-swift.enum/dragging). If you perform an animation to indicate the beginning of a drag, perform that animation before changing the state. Changing the state to the new value lets the map know when your animations complete.
- When the state changes to either [`MKAnnotationView.DragState.canceling`](/documentation/MapKit/MKAnnotationView/DragState-swift.enum/canceling) or [`MKAnnotationView.DragState.ending`](/documentation/MapKit/MKAnnotationView/DragState-swift.enum/ending), set the state to [`MKAnnotationView.DragState.none`](/documentation/MapKit/MKAnnotationView/DragState-swift.enum/none). If you perform an animation at the end of a drag, perform that animation before changing the state.

Changing the state to the [`MKAnnotationView.DragState.dragging`](/documentation/MapKit/MKAnnotationView/DragState-swift.enum/dragging) or [`MKAnnotationView.DragState.none`](/documentation/MapKit/MKAnnotationView/DragState-swift.enum/none) value is the way to signal to the map view when you finish performing animations. For example, when a drag operation begins for an annotation, the class executes an animation to lift the view off the map. Similarly, when the user drops the annotation, the class performs a drop animation. Even if you don’t perform any animations, it’s best practice to change the value of this property to reflect the correct state.

Don’t try to stop a new drag operation by changing the state from `starting` to `none`. If you don’t want your annotation view to be draggable, set the [`isDraggable`](/documentation/MapKit/MKAnnotationView/isDraggable) property to <doc://com.apple.documentation/documentation/Swift/false>.

---

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)