Contents

UIScribbleInteraction

An interaction for customizing the behavior of Scribble on text input views, or for suppressing it entirely in specific cases.

Declaration

@MainActor class UIScribbleInteraction

Overview

By default, Scribble lets users enter text by writing directly into any editable view that implements UITextInput.

In apps with customized text fields, you can use the UIScribbleInteractionDelegate callbacks to optimize the UI for a better writing experience. For example, you can hide custom placeholders when the user starts writing, or delay focusing on the field if it moves while gaining focus.

With text views that support drawing with Apple Pencil, you’ll need to suppress Scribble on nearby text fields to keep them from taking over the Pencil events for writing.

Topics

Creating a Scribble interaction

Managing Scribble interactions

Detecting writing

Expecting input from Apple Pencil

See Also

Text fields