---
title: "indirectScribbleInteraction(_:requestElementsIn:completion:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiindirectscribbleinteractiondelegate-hdh/indirectscribbleinteraction(_:requestelementsin:completion:)"
---

# indirectScribbleInteraction(_:requestElementsIn:completion:)

Asks the delegate to return the locations of text input elements inside the specified rectangle of the view.

## Declaration

```swift
func indirectScribbleInteraction(_ interaction: any UIInteraction, requestElementsIn rect: CGRect, completion: @escaping ([Self.ElementIdentifier]) -> Void)
```

## Parameters

- `interaction`: The interaction where the user finished writing.
- `rect`: The rect around the area where the user is trying to write, in the interaction’s view coordinate system. Return only the elements intersecting this rect.
- `completion`: A completion handler that you must call, either synchronously or asynchronously. Pass an array of identifiers of the available elements, or an empty array if there are no elements.

## Discussion

Discussion Each rectangle returned by the completion handler represents an area where the user can start writing even if it’s not a text input field itself.

## See Also

### Finding Elements and Frames

- [indirectScribbleInteraction(_:frameForElement:)](uikit/uiindirectscribbleinteractiondelegate-hdh/indirectscribbleinteraction(_:frameforelement:).md)
