<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSDraggingDestination/draggingEnded(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSDraggingDestination(im)draggingEnded:"
  },
  "title" : "draggingEnded(_:)"
}
-->

# draggingEnded(_:)

Called when a drag operation ends.

```
@MainActor optional func draggingEnded(_ sender: any NSDraggingInfo)
```

## Parameters

`sender`

The object sending the message; use it to get details about the dragging operation.

## Discussion

Implement this method if you want to be notified when a drag operation ends, which can be useful if the drag ends in some other destination. For example, this method might be used by a destination doing auto-expansion in order to collapse any auto-expands.

---

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)