Contents

UITextDragPreviewRenderer

Renders previews of text dragged by the user.

Declaration

@MainActor class UITextDragPreviewRenderer

Overview

Use this class to provide custom previews of dragged text that follows user interface guidelines and handles right-to-left text. You provide the layout manager and the range to render the preview.

Subclasses may override the adjust(firstLineRect:bodyRect:lastLineRect:textOrigin:) method to modify the detected rectangles as needed during the drag operation.

Topics

Initializing a text drag preview renderer

Getting and setting bounding rectangles

Getting the preview image

Getting the layout manager

See Also

Drag content