The interface for initiating drags from a collection view.


@protocol UICollectionViewDragDelegate


Implement this protocol in the object that you use to initiate drags from your collection view. The only required method of this protocol is the collectionView:itemsForBeginningDragSession:atIndexPath: method, but you can implement other methods as needed to customize the drag behavior of your collection view.

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


Providing the Items to Drag

- collectionView:itemsForBeginningDragSession:atIndexPath:

Provides the initial set of items (if any) to drag.


- collectionView:itemsForAddingToDragSession:atIndexPath:point:

Adds the specified items to an existing drag session.

Tracking the Drag Session

- collectionView:dragSessionWillBegin:

Notifies you that a drag session is about to begin for the collection view.

- collectionView:dragSessionDidEnd:

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

Providing a Custom Preview

- collectionView:dragPreviewParametersForItemAtIndexPath:

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

Controlling the Drag Session

- collectionView:dragSessionAllowsMoveOperation:

Returns a Boolean value that determines whether a move operation is allowed for a drag session.

- collectionView:dragSessionIsRestrictedToDraggingApplication:

Returns a Boolean value that determines whether the source app and destination app must be the same for a drag session.


Inherits From

See Also

Drag and Drop

Supporting Drag and Drop in Collection Views

Initiate drags and handle drops from a collection view.


The interface for handling drops in a collection view.


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


A placeholder for an item dropped on a collection view.


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


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


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


An advanced interface for managing a data source object.


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