---
title: "draggingEnded(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsdraggingdestination/draggingended(_:)"
---

# draggingEnded(_:)

Called when a drag operation ends.

## Declaration

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

## Parameters

- `sender`: The object sending the message; use it to get details about the dragging operation.

## Discussion

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.

## See Also

### Managing a Dragging Session Before an Image Is Released

- [draggingEntered(_:)](appkit/nsdraggingdestination/draggingentered(_:).md)
- [wantsPeriodicDraggingUpdates()](appkit/nsdraggingdestination/wantsperiodicdraggingupdates().md)
- [draggingUpdated(_:)](appkit/nsdraggingdestination/draggingupdated(_:).md)
- [draggingExited(_:)](appkit/nsdraggingdestination/draggingexited(_:).md)
