<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionViewDragDelegate/collectionView(_:dragSessionDidEnd:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UICollectionViewDragDelegate(im)collectionView:dragSessionDidEnd:"
  },
  "title" : "collectionView(_:dragSessionDidEnd:)"
}
-->

# collectionView(_:dragSessionDidEnd:)

Notifies you that a drag session ended for the collection view.

```
optional func collectionView(_ collectionView: UICollectionView, dragSessionDidEnd session: any UIDragSession)
```

## Parameters

`collectionView`

The collection view from which the drag operation originated.

`session`

The drag session that ended.

## Discussion

This method is called after the drag session ended, usually because the content was dropped but possibly because the drag was terminated. Use this method to close out any tasks related to the management of the drag session in your app.

Each call to this method is always balanced by a call to the [`collectionView(_:dragSessionWillBegin:)`](/documentation/UIKit/UICollectionViewDragDelegate/collectionView(_:dragSessionWillBegin:)) method.

---

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)