The interface for customizing the behavior of a drag activity for a text view.


protocol UITextDragDelegate


Handling Drag Session Notifications

func textDraggableView(UIView & UITextDraggable, dragSessionWillBegin: UIDragSession)

Tells the delegate that the text has been lifted out of the text view and the user is beginning to drag the text.

Providing Additional Animations

func textDraggableView(UIView & UITextDraggable, willAnimateLiftWith: UIDragAnimating, session: UIDragSession)

Tells the delegate when the lift animation is about to begin, and gives you a chance to animate additional changes alongside the system animation.

Providing Custom Drag Items

Providing a Custom Preview for a Drag Activity

func textDraggableView(UIView & UITextDraggable, dragPreviewForLiftingItem: UIDragItem, session: UIDragSession) -> UITargetedDragPreview?

Asks the delegate for the preview to show during the lift animation that happens when a user begins to drag an item from a text view.


Inherits From

See Also

Text View Additions

protocol UITextDropDelegate

The interface for configuring a text view’s drop behavior.

protocol UITextDraggable

The interface that determines if a text view is a drag source.

struct UITextDragOptions

A set of options that determine the behavior of a draggable text view.

protocol UITextDroppable

The interface that determines if a text view is a drop destination.

enum UITextDropEditability

The text-drop editability styles for noneditable text views.