indirectScribbleInteraction(_:requestElementsIn:completion:)
Asks the delegate to return the locations of text input elements inside the specified rectangle of the view.
Declaration
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
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.