<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextDragDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITextDragDelegate"
  },
  "title" : "UITextDragDelegate"
}
-->

# UITextDragDelegate

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

```
@MainActor protocol UITextDragDelegate : NSObjectProtocol
```

## Topics

### Handling drag session notifications

[`func textDraggableView(any UIView & UITextDraggable, dragSessionWillBegin: any UIDragSession)`](/documentation/UIKit/UITextDragDelegate/textDraggableView(_:dragSessionWillBegin:))

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

[`func textDraggableView(any UIView & UITextDraggable, dragSessionDidEnd: any UIDragSession, with: UIDropOperation)`](/documentation/UIKit/UITextDragDelegate/textDraggableView(_:dragSessionDidEnd:with:))

Tells the delegate that the drag session has ended.

### Providing additional animations

[`func textDraggableView(any UIView & UITextDraggable, willAnimateLiftWith: any UIDragAnimating, session: any UIDragSession)`](/documentation/UIKit/UITextDragDelegate/textDraggableView(_:willAnimateLiftWith:session:))

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

[`func textDraggableView(any UIView & UITextDraggable, itemsForDrag: any UITextDragRequest) -> [UIDragItem]`](/documentation/UIKit/UITextDragDelegate/textDraggableView(_:itemsForDrag:))

Asks the delegate for custom drag items from a text view.

### Providing a custom preview for a drag activity

[`func textDraggableView(any UIView & UITextDraggable, dragPreviewForLiftingItem: UIDragItem, session: any UIDragSession) -> UITargetedDragPreview?`](/documentation/UIKit/UITextDragDelegate/textDraggableView(_:dragPreviewForLiftingItem:session:))

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.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)