Contents

UICollectionViewDragDelegate

The interface for initiating drags from a collection view.

Declaration

@MainActor protocol UICollectionViewDragDelegate : NSObjectProtocol

Mentioned in

Overview

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(_:itemsForBeginning:at:) 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.

Topics

Providing the items to drag

Tracking the drag session

Providing a custom preview

Controlling the drag session

See Also

Drag and drop