Meet Scribble for iPad
Description: Scribble offers a lightweight, ergonomic, and enjoyable way of entering text on iPad with Apple Pencil. Discover how people can take advantage of Scribble and handwritten text in apps that use standard text input controls or that implement a custom text editing experience. You’ll learn how it integrates into TextKit, and when you’ll need to adopt the new UIScribbleInteraction and UIIndirectScribbleInteraction APIs to provide a delightful and consistent experience with Scribble in your app. To get the most out of this session, you should be familiar with UIKit text input controls, as well as keyboard input technologies. To get started, watch “Keyboard Input in iOS”. If you’re building a custom text editor, you should be familiar with the UITextInput protocol, TextKit, and related text input APIs. For more information, we recommend checking out “TextKit Best Practices” and “The Keys to a Better Text Input Experience.” And for design guidelines on pencil-based interaction, check out “Apple Pencil Design Essentials.”
- You can write directly on a text field without the need to select the field first.
- You can draw a horizontal line to select text and perform the normal text editing actions.
- You can also scratch out some text that you want to delete.
Scribble Supporting APIs
- Scribble relies on standard Text controls/inputs (
- Scribble does not support password fields (because Apple's recommended way to input password is via auto fill)
- for custom UI elements Scribble relies on UIKit's text input protocols (
Both interactions are added to views where the custom behavior takes place.
The interaction has a delegate, and this delegate is where an app can customize the Scribble experience, for example:
- disabling Scribble on the view
- delaying that view from becoming first responder until handwriting has momentarily paused
- being informed when Scribble handwriting begins or ends
Thanks to this interaction:
- we can allow writing outside a input control.
- this is also the interaction to use for UI that would become editable in response to a tap gesture.
This is done via the interaction's delegate. Which will provide the system information about elements, aka regions within the view that can be written into.