<!--
{
  "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/textDraggableView(_:itemsForDrag:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITextDragDelegate(im)textDraggableView:itemsForDrag:"
  },
  "title" : "textDraggableView(_:itemsForDrag:)"
}
-->

# textDraggableView(_:itemsForDrag:)

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

```
optional func textDraggableView(_ textDraggableView: any UIView & UITextDraggable, itemsForDrag dragRequest: any UITextDragRequest) -> [UIDragItem]
```

## Parameters

`textDraggableView`

The text view where the drag activity was started.

`dragRequest`

The current drag request.

## Return Value

An array of drag items that represent the items to drag.

## Discussion

You implement this method when you need to provide custom drag items. The drag request gives you the text range of the text that is included in the drag activity. It also gives you the default drag items, which you can add to or change. If you return an empty array, the drag operation does not happen.

> Note:
> This method may be called more than once. For instance, it is called each time the user adds more drag items to the session. You can detect additional calls to this method by checking the ``doc://com.apple.uikit/documentation/UIKit/UITextDragRequest/existingItems`` property on the drag request.

---

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)