Drag and Drop Customization

Extend the standard drag and drop support for text views to include custom types of content.

Overview

The UITextField and UITextView classes provide built-in support for dragging and dropping text and images. You can extend this support to your own custom data types by adding a text drag delegate or text drop delegate to your views. Your text drag delegate adopts the UITextDragDelegate protocol and is responsible for providing the items to be dragged. Your text drop delegate adopts the UITextDropDelegate protocol and handles drops containing items with your custom data types.

Topics

Text View Additions

UITextDragDelegate

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

UITextDropDelegate

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

UITextDraggable

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

UITextDragOptions

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

UITextDroppable

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

UITextDropEditability

The text-drop editability styles for noneditable text views.

Drag Content

UITextDragRequest

The interface for describing the attributes of a drag activity originating in a text view.

Drop Management

UITextDropRequest

The interface for specifying the attributes of a drop request for a text view.

UITextDropProposal

A proposed configuration for the behavior of a text drop interaction.

UITextDropAction

The text drop action styles for text views.

UITextDropPerformer

The performers that are responsible for handling the drop operation.

UITextDropProgressMode

The text drop progress styles for user-visible progress indication.

Pasteboard Support

UITextPasteItem

The interface for obtaining information about, and interacting with, a text item for pasting or dropping.

UITextPasteDelegate

The interface for handling pasting and dropping of text, using item providers.

UITextPasteConfigurationSupporting

The interface for text-oriented responder objects to participate in the unified paste and drop system in iOS.

See Also

Text Views

UILabel

A view that displays one or more lines of read-only text, often used in conjunction with controls to describe their intended purpose.

UITextField

An object that displays an editable text area in your interface.

UITextView

A scrollable, multiline text region.