Protocol

UIDragInteractionDelegate

The interface for configuring and controlling a drag interaction.

Declaration

@protocol UIDragInteractionDelegate

Topics

Performing the Drag

- dragInteraction:itemsForBeginningSession:

Asks the delegate for the array of drag items for an impending drag interaction.

Required.

- dragInteraction:itemsForAddingToSession:withTouchAtPoint:

Asks the delegate for the drag items to add to an in-progress drag session, in response to a user gesture to add the items.

- dragInteraction:sessionForAddingItems:withTouchAtPoint:

Asks the delegate which drag session to add drag items to when there is more than one in-progress session.

Animating the Drag Behaviors

- dragInteraction:willAnimateLiftWithAnimator:session:

Tells the delegate the system's lift animation is about to start.

- dragInteraction:item:willAnimateCancelWithAnimator:

Tells the delegate the system's cancellation animation is about to start.

Monitoring Drag Progress

- dragInteraction:sessionWillBegin:

Tells the delegate the lift animation has finished and the user is starting to move the items across the screen.

- dragInteraction:session:willAddItems:forInteraction:

Tells the delegate an interaction is about to add items to a drag session.

- dragInteraction:sessionDidMove:

Tells the delegate the user moved the drag items to a new location on the screen.

- dragInteraction:session:willEndWithOperation:

Tells the delegate the drag activity will end with the specified operation.

- dragInteraction:session:didEndWithOperation:

Tells the delegate the drag activity and its related animations have finished.

- dragInteraction:sessionDidTransferItems:

Tells the delegate the destination view has received the data for the drag items.

Providing Drag Previews

- dragInteraction:previewForLiftingItem:session:

Asks the delegate for the targeted drag item preview that will appear during the lift animation.

- dragInteraction:previewForCancellingItem:withDefault:

Asks the delegate for the targeted drag item preview to show during the cancellation animation.

- dragInteraction:prefersFullSizePreviewsForSession:

Asks the delegate whether the preview should appear in its original size or a scaled size.

Restricting the Drag Behavior

- dragInteraction:sessionIsRestrictedToDraggingApplication:

Asks the delegate whether the system should restrict the drag session to the app that started the session.

- dragInteraction:sessionAllowsMoveOperation:

Asks the delegate whether the session allows the move operation.

Relationships

Inherits From

See Also

Drag-and-Drop Interactions

UIDropInteractionDelegate

The interface for configuring and controlling a drop interaction.

UIDragInteraction

An interaction to enable dragging of items from a view, employing a delegate to provide drag items and to respond to calls from the drag session.

UIDropInteraction

An interaction to enable dropping of items onto a view, employing a delegate to instantiate objects and respond to calls from the drop session.