Apple Pencil and Scribble

Apple Pencil is a versatile, intuitive tool for iPad apps that offers pixel‑level precision when jotting notes, sketching, painting, marking up documents, and more. In iPadOS 14 and later, Scribble lets people use Apple Pencil to enter text in any text field through fast, private, on-device handwriting recognition. For guidance, see Supporting Scribble.

Image of Apple Pencil, a pencil-shaped tool with a rounded tip and the Apple logo on the side next to the word Pencil.

Support expected behaviors. Apple Pencil is designed to make drawing, handwriting, and marking effortless and natural, and it also performs as a pointer or UI interaction tool. In addition to enabling the Apple Pencil behaviors people expect, consider supporting unexpected interactions, too. For example, your app might let people make notes in the margins of a document.

Let people choose when to switch between Apple Pencil and finger input — don’t force them. For example, people shouldn’t need to switch from Apple Pencil to their finger to interact with a control. If your app supports Apple Pencil for marking, your app’s controls should also respond to Apple Pencil. An unresponsive control causes confusion, and can give the impression of a malfunction or low battery. Likewise, let people also use a finger to draw and make marks. (Scribble supports only Apple Pencil input.)

Let people make a mark the moment Apple Pencil touches the screen. The experience of putting Apple Pencil to screen should mirror the experience of putting a classic pencil to paper. Don’t require people to tap a button or enter a special mode before using Apple Pencil.

Help people express themselves by responding to the way they use Apple Pencil. Apple Pencil can sense tilt (altitude), force (pressure), and orientation (azimuth). Your app should use this information to affect the strokes Apple Pencil makes, such as by varying thickness and intensity. When responding to pressure, keep things simple and intuitive. For example, it feels natural to affect continuous properties — such as ink opacity or brush size — by varying the pressure.

Diagram of Apple Pencil tilted up from a horizontal line by 45 degrees.

Altitude

Diagram of Apple Pencil drawing a curved line that increases in thickness as more pressure is applied to the tool.

Pressure

Diagram of Apple Pencil balancing on its tip at the center of a circle that has degree marks around its circumference. A line from the center of the circle to one of the degree marks indicates the angle at which Apple Pencil is tilted.

Azimuth

Use visual feedback to indicate a direct connection with content. Apple Pencil should appear to directly and immediately manipulate content it touches onscreen. It shouldn’t initiate seemingly disconnected actions, or affect content on other parts of the screen.

Design a great left- and right-handed experience. Avoid placing controls in locations that may be obscured by either hand. If there’s a chance controls may become obscured, consider letting people reposition them.

Diagram of an iPad app that shows a stack of three blue circular controls on both side edges. A drawing of a person’s left hand holding an Apple Pencil is shown at the bottom-left corner of the screen, partially obscuring the controls on that side. The controls on the left edge are grayed out to indicate the original position they no longer occupy, while the controls on the right edge are bright blue to indicate their final position.

Diagram of an iPad app that shows a stack of three blue circular controls on both side edges. A drawing of a person’s right hand holding an Apple Pencil is shown at the bottom-right corner of the screen, partially obscuring the controls on that side. The controls on the right edge are grayed out to indicate the original position they no longer occupy, while the controls on the left edge are bright blue to indicate their final position.

Diagram of an iPad app that shows a row of three bright blue circular controls at the top edge of the screen. A drawing of a person’s right hand holding an Apple Pencil is shown at the bottom-right corner of the screen. The controls at the top edge aren’t obscured by the hand.

Whenever possible, respect the user’s settings for the double-tap gesture. Apple Pencil 2 responds to the double-tap gesture by changing how it draws, either directly (by changing the tool) or indirectly (by presenting color options). Although double-tap toggles between the current tool and the eraser by default, people can go to Settings and specify that double-tap should toggle between the current and previous tool, show and hide the color picker, or do nothing at all. If your app supports these behaviors, respect the systemwide settings for double-tap, and don’t expect people to learn new gestures for the same behaviors. If the systemwide double-tap settings don’t make sense in your app, you can still use the gesture to change the mode of Apple Pencil 2. For example, users of a 3D app with a mesh editing tool could use double-tap to toggle between the tool’s raise and lower modes.

Give people a way to enable custom double-tap behavior if necessary. When your app supports some or all of the Apple Pencil 2 double-tap behaviors, but you also support a custom double-tap behavior, offer a control that lets people enable the custom behavior. If users don’t have an explicit way to enable the custom behavior, they may get confused when your app doesn’t respond to their systemwide double-tap settings. In this scenario, make sure it’s easy for people to discover the alternative behaviors your app supports, but don’t enable them by default.

Never use the double-tap gesture to perform an action that modifies content. It’s possible for people to double-tap accidentally, which means that they may not even be aware that your app has performed the action. When double-tapping toggles between tool modes, it’s easy for users to reverse an accidental mode change by simply double-tapping again. In an app that uses the gesture to perform an action, however, people must disrupt their workflow to find a way to undo it. Even worse is an app that uses double-tap to perform a potentially destructive action: if users are unaware that the action has occurred, they can lose data.

For developer guidance, see Pencil Interactions.

Supporting Scribble

With Scribble and Apple Pencil, people can simply write wherever text is accepted in your app — they don’t have to tap or switch modes first. Because Scribble is fully integrated into iPadOS 14 and later, it’s available to all apps by default, just like the keyboard. The following guidelines help you enhance the default Scribble support and provide a great writing experience in your app.

Always make entering text feel fluid and effortless. By default, Scribble works in all standard text controls — such as text fields, text views, search fields, and editable fields in web content — except password fields. If you use a custom text field in your app, don’t make people tap or select it before they can begin writing.

Make Scribble available everywhere people might want to enter text. Unlike using the keyboard, using Apple Pencil encourages people to treat the screen the way they treat a sheet of paper. Help strengthen this perception in your app by making Scribble consistently available in places where text entry seems natural. For example, in Reminders, it’s natural for people to create a new reminder by writing it in the blank space below the last item, even though the area doesn’t contain a text field. For developer guidance, see UIIndirectScribbleInteraction.

Avoid distracting people while they write. Some text field behaviors work well for keyboard input, but can disrupt the natural writing experience that Apple Pencil enables. For example, it’s best to avoid displaying autocompletion text as people write in a text field because the suggestions can visually interfere with their writing. It’s also a good idea to hide a field’s placeholder text the moment people begin to write so that their input doesn’t appear to overlap it.

While people are writing in a text field, make sure it remains stationary and its contents don’t scroll. In some cases, it makes sense to move a text field when it becomes focused: for example, a search field might move to make more room to display results. Such a movement is fine when people are using the keyboard, but when they’re writing it can make them feel like they’ve lost control of where their input is going. If you can’t prevent a text field from moving, consider delaying the movement until people pause their writing (for developer guidance, see scribbleInteractionShouldDelayFocus(_:)).

It’s also important to prevent autoscrolling while people are writing and editing in a text field. When transcribed text autoscrolls, people might try to avoid writing on top of it. Worse, if text scrolls while people are using Apple Pencil to select it, they might select a different range of text than what they want.

Give people enough space to write. A small text field is fine when people use the keyboard to enter text, but it can feel uncomfortable to write in. When you know that Apple Pencil input is likely, improve the writing experience in your app by increasing the size of the text field before people begin to write in it or when they pause writing. Always avoid resizing a text field while people are writing.

For developer guidance, see UIScribbleInteraction.

Providing a Custom Drawing Experience

Using PencilKit, you can let people take notes, annotate documents and images, and draw with the same low-latency experience that iOS provides. PencilKit also makes it easy to create a custom drawing canvas in your app and offer a state-of-the-art tool picker and ink palette. For developer guidance, see PencilKit.

Help people draw on top of existing content. By default, the colors on your PencilKit canvas dynamically adjust to dark mode, so people can create content in either mode and the results will look great in both. However, when people draw on top of existing content like a PDF or a photo, you probably want to prevent the dynamic adjustment of colors so that the markup remains sharp and visible.

Make sure the tool picker doesn’t obscure content when your app runs in a compact environment. In a regular environment, the tool picker floats above the content so people can move it out of the way, but in a compact environment the tool picker stays pinned to the bottom edge of the screen. To avoid obscuring people’s content, you can adjust the content view’s frame or the scroll view insets to account for the height of the tool picker.

Image of an iPhone screen that displays a photo of a tall tree. The image has been moved towards the top of the screen so that the tool picker at the bottom edge does not obscure the tree’s trunk. Below the image, a checkmark indicates this is the recommended style of layout.

White checkmark in a green circle to indicate correct usage.

Image of an iPhone screen that displays a photo of a tall tree. The tool picker at the bottom edge obscures the foreground of the photo, including most of the tree’s trunk. Below the image, an X indicates the layout is not recommended.

White X in a gray circle to indicate incorrect usage.

Consider providing custom undo and redo buttons to display when your app runs in a compact environment. In a regular environment, the tool picker includes undo and redo buttons, but in a compact environment it doesn’t. In a compact environment, you could display your custom buttons in a navigation bar. You might also consider supporting the standard 3-finger undo/redo gesture, so people can use it in any environment. For guidance, see Undo and Redo.

Image of an iPad screen that displays a photo of some flowers and the tool picker at the bottom edge of the screen. The image is highlighted to show the standard undo and redo buttons in the left end of the tool picker.

Regular environment


Image of an iPhone screen showing a note that contains a photo of some mangoes and the tool picker at the bottom of the screen, below the photo. The screen is highlighted to show the undo and redo buttons in the navigation bar.

Compact environment