---
title: "collectionView(_:dropSessionDidExit:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollectionviewdropdelegate/collectionview(_:dropsessiondidexit:)"
---

# collectionView(_:dropSessionDidExit:)

Notifies you when dragged content exits the collection view’s bounds rectangle.

## Declaration

```swift
optional func collectionView(_ collectionView: UICollectionView, dropSessionDidExit session: any UIDropSession)
```

## Parameters

- `collectionView`: The collection view that was tracking the dragged content.
- `session`: The drop session object containing information about the type of data being dragged.

## Discussion

Discussion UIKit calls this method when dragged content exits the bounds rectangle of the specified collection view. The method isn’t called again until the dragged content enters the collection view’s bounds (triggering a call to the collectionView(_:dropSessionDidEnter:) method) and exits again. Use this method to clean up any state information that you configured in your collectionView(_:dropSessionDidEnter:) method.

## See Also

### Tracking the drag movements

- [collectionView(_:dropSessionDidUpdate:withDestinationIndexPath:)](uikit/uicollectionviewdropdelegate/collectionview(_:dropsessiondidupdate:withdestinationindexpath:).md)
- [collectionView(_:dropSessionDidEnter:)](uikit/uicollectionviewdropdelegate/collectionview(_:dropsessiondidenter:).md)
- [collectionView(_:dropSessionDidEnd:)](uikit/uicollectionviewdropdelegate/collectionview(_:dropsessiondidend:).md)
