---
title: "collectionView(_:dragSessionDidEnd:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollectionviewdragdelegate/collectionview(_:dragsessiondidend:)"
---

# collectionView(_:dragSessionDidEnd:)

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

## Declaration

```swift
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

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:) method.

## See Also

### Tracking the drag session

- [collectionView(_:dragSessionWillBegin:)](uikit/uicollectionviewdragdelegate/collectionview(_:dragsessionwillbegin:).md)
