<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIIndirectScribbleInteractionDelegate-hdh",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit37UIIndirectScribbleInteractionDelegateP"
  },
  "title" : "UIIndirectScribbleInteractionDelegate"
}
-->

# UIIndirectScribbleInteractionDelegate

Methods that customize behavior on views that aren’t formally text input views.

```
protocol UIIndirectScribbleInteractionDelegate : NSObjectProtocol
```

## Topics

### Identifying Elements

[`associatedtype ElementIdentifier : Hashable = String`](/documentation/UIKit/UIIndirectScribbleInteractionDelegate-hdh/ElementIdentifier)

A unique identifier for a control that isn’t a text field in a Scribble interaction.

### Managing Focus

[`func indirectScribbleInteraction(any UIInteraction, isElementFocused: Self.ElementIdentifier) -> Bool`](/documentation/UIKit/UIIndirectScribbleInteractionDelegate-hdh/indirectScribbleInteraction(_:isElementFocused:))

Asks the delegate if an element is currently focused, according to the internal state of the interaction’s view.

[`func indirectScribbleInteraction(any UIInteraction, focusElementIfNeeded: Self.ElementIdentifier, referencePoint: CGPoint, completion: ((any UIResponder & UITextInput)?) -> Void)`](/documentation/UIKit/UIIndirectScribbleInteractionDelegate-hdh/indirectScribbleInteraction(_:focusElementIfNeeded:referencePoint:completion:))

Asks the delegate to focus an element to handle text edits.

[`func indirectScribbleInteraction(any UIInteraction, shouldDelayFocusForElement: Self.ElementIdentifier) -> Bool`](/documentation/UIKit/UIIndirectScribbleInteractionDelegate-hdh/indirectScribbleInteraction(_:shouldDelayFocusForElement:))

Allow the delegate to delay focusing an element.

### Tracking Scribble Input

[`func indirectScribbleInteraction(any UIInteraction, willBeginWritingInElement: Self.ElementIdentifier)`](/documentation/UIKit/UIIndirectScribbleInteractionDelegate-hdh/indirectScribbleInteraction(_:willBeginWritingInElement:))

Informs the delegate when the user begins writing.

[`func indirectScribbleInteraction(any UIInteraction, didFinishWritingInElement: Self.ElementIdentifier)`](/documentation/UIKit/UIIndirectScribbleInteractionDelegate-hdh/indirectScribbleInteraction(_:didFinishWritingInElement:))

Informs the delegate when the user finishes writing.

### Finding Elements and Frames

[`func indirectScribbleInteraction(any UIInteraction, frameForElement: Self.ElementIdentifier) -> CGRect`](/documentation/UIKit/UIIndirectScribbleInteractionDelegate-hdh/indirectScribbleInteraction(_:frameForElement:))

Asks the delegate to provide the frame of an element.

[`func indirectScribbleInteraction(any UIInteraction, requestElementsIn: CGRect, completion: ([Self.ElementIdentifier]) -> Void)`](/documentation/UIKit/UIIndirectScribbleInteractionDelegate-hdh/indirectScribbleInteraction(_:requestElementsIn:completion:))

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

### Instance Methods

[`func indirectScribbleInteraction(any UIInteraction, focusElementIfNeeded: Self.ElementIdentifier, referencePoint: CGPoint) async -> (any UIResponder & UITextInput)?`](/documentation/UIKit/UIIndirectScribbleInteractionDelegate-hdh/indirectScribbleInteraction(_:focusElementIfNeeded:referencePoint:))

[`func indirectScribbleInteraction(any UIInteraction, requestElementsIn: CGRect) async -> [Self.ElementIdentifier]`](/documentation/UIKit/UIIndirectScribbleInteractionDelegate-hdh/indirectScribbleInteraction(_:requestElementsIn:))

## 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)