Protocol

UICollectionViewDropDelegate

The interface for handling drops in a collection view.

Declaration

@protocol UICollectionViewDropDelegate

Overview

Implement this protocol in the object that you use to incorporate dropped data into your collection view. The only required method of this protocol is the collectionView:performDropWithCoordinator: method, but you can implement other methods as needed to customize the drop behavior of your collection view.

Assign your custom delegate object to the dropDelegate property of your collection view.

Topics

Declaring Support for Handling Drops

- collectionView:canHandleDropSession:

Asks your delegate whether the collection view can accept a drop with the specified type of data.

Incorporating the Dropped Data

- collectionView:performDropWithCoordinator:

Tells your delegate to incorporate the drop data into the collection view.

Required.

Tracking the Drag Movements

- collectionView:dropSessionDidUpdate:withDestinationIndexPath:

Tells your delegate that the position of the dragged data over the collection view changed.

- collectionView:dropSessionDidEnter:

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

- collectionView:dropSessionDidExit:

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

- collectionView:dropSessionDidEnd:

Notifies you when the drag operation ends.

Providing a Custom Preview

- collectionView:dropPreviewParametersForItemAtIndexPath:

Returns custom information about how to display the item at the specified location during the drop.

Relationships

Inherits From

See Also

Drag and Drop

Supporting Drag and Drop in Collection Views

Initiate drags and handle drops from a collection view.

UICollectionViewDragDelegate

The interface for initiating drags from a collection view.

UICollectionViewDropCoordinator

An interface for coordinating your custom drop-related actions with the collection view.

UICollectionViewDropPlaceholder

A placeholder for an item dropped on a collection view.

UICollectionViewDropProposal

Your proposed solution for handling a drop in a collection view.

UICollectionViewDropItem

The data associated with an item being dropped into the collection view.

UICollectionViewDropPlaceholderContext

An object that contains information about a placeholder in the collection view.

UIDataSourceTranslating

An advanced interface for managing a data source object.

UICollectionViewPlaceholder

A placeholder for an item dragged or dropped on a collection view.