dragInteraction(_:previewForLifting:session:)
Asks the delegate for the targeted drag item preview that will appear during the lift animation.
Declaration
optional func dragInteraction(_ interaction: UIDragInteraction, previewForLifting item: UIDragItem, session: any UIDragSession) -> UITargetedDragPreview?Parameters
- interaction:
The interaction that called this method.
- item:
The drag item represented by the preview.
- session:
The current drag session.
Return Value
A targeted drag item preview you create, or nil to tell the system not to display the lift animation.
Discussion
If you don’t provide this method, the system creates a preview based on the view owned by the drag interaction.