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

# collectionView(_:draggingSession:endedAt:dragOperation:)

Notifies your delegate that a drag session ended.

```
@MainActor optional func collectionView(_ collectionView: NSCollectionView, draggingSession session: NSDraggingSession, endedAt screenPoint: NSPoint, dragOperation operation: NSDragOperation)
```

## Parameters

`collectionView`

The collection view notifying your delegate object.

`session`

The dragging session that ended.

`screenPoint`

The end point (in screen coordinates) for the drag operation.

`operation`

The operation that was performed. Use this value to determine how the operation ended. For example, for content that was dragged to the trash, the operation type would be [`delete`](/documentation/AppKit/NSDragOperation/delete).

## Discussion

You can use this method to perform tasks related to the ending of a drag session.

---

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)