Contents

collectionView(_:dropSessionDidEnd:)

Notifies you when the drag operation ends.

Declaration

optional func collectionView(_ collectionView: UICollectionView, dropSessionDidEnd session: any UIDropSession)

Parameters

  • collectionView:

    The collection view that’s tracking the dragged content.

  • session:

    The drop session object containing information about the data being dragged.

Discussion

The collection view calls this method at the conclusion of a drag that was over the collection view at one point. Use it to clean up any state information that you used to handle the drag. This method is called regardless of whether the data was actually dropped onto the collection view.

See Also

Tracking the drag movements