collectionView(_:dropSessionDidUpdate:withDestinationIndexPath:)
Tells your delegate that the position of the dragged data over the collection view changed.
Declaration
optional func collectionView(_ collectionView: UICollectionView, dropSessionDidUpdate session: any UIDropSession, withDestinationIndexPath destinationIndexPath: IndexPath?) -> UICollectionViewDropProposalParameters
- collectionView:
The collection view that’s tracking the dragged content.
- session:
The drop session object containing information about the type of data being dragged.
- destinationIndexPath:
The index path at which the content would be dropped.
Mentioned in
Return Value
Your proposal for how to handle the content if it is dropped at the specified location.
Discussion
While the user is dragging content, the collection view calls this method repeatedly to determine how you would handle the drop if it occurred at the specified location. The collection view provides visual feedback to the user based on your proposal.
In your implementation of this method, create a UICollectionViewDropProposal object and use it to convey your intentions. Because this method is called repeatedly while the user drags over the table view, your implementation should return as quickly as possible.