PadCodedocs

Apple Pencil

Use Apple Pencil in the Builder: tap and drag precisely, double-tap and squeeze for quick actions, hover to see what you'll select, and let only the Pencil select.

Every Apple Pencil works on the canvas the way your finger does, only more precisely: tap a view to select it, touch and hold a view to move it. Newer Pencils do more. Double-tap and squeeze each run an action you choose, and hovering shows which view a tap would select. All of it works the same on a widget's canvas.

Quick Actions open on the canvas, at the Pencil's tip: Undo, Redo, Duplicate, Delete, Add Component and Preview.

#What your Pencil can do

Apple PencilTap and dragDouble-tapSqueezeHover
Apple Pencil ProYesYesYesYes
Apple Pencil (2nd generation)YesYesNoOn iPad Pro with M2
Apple Pencil (USB-C)YesNoNoYes
Apple Pencil (1st generation)YesNoNoNo

Hover also needs an iPad that senses the Pencil above the screen: an iPad Pro with M2 or later, an iPad Air with M2 or later, or an iPad mini with A17 Pro.

Out of the box, in the Builder:

GestureDoesPencils
Double-tapUndoApple Pencil Pro, Apple Pencil (2nd generation)
SqueezeQuick ActionsApple Pencil Pro
HoverOutlines the view under the tipPencils and iPads that hover

To change them, see Choose what double-tap and squeeze do.

#Tap, drag and write

  • Select: tap a view with the Pencil. See Select a view.
  • Move: touch and hold a view with the Pencil, then drag it. See Move a view.
  • Zoom and pan: pinch with two fingers, as always. See Zoom and pan.
  • Write in a field: with Scribble on in iPadOS's Settings › Apple Pencil, write in any text field (a view's text in the Inspector, a variable's name, Search components) and it turns into typed text. Writing on the canvas doesn't type: the text fields on your screen only take text in Preview.

#Double-tap

Double-tap the flat side of an Apple Pencil Pro or Apple Pencil (2nd generation) while the Builder's canvas is on screen. Out of the box it's Undo: each double-tap takes back one more change.

#Squeeze

Squeeze an Apple Pencil Pro. Out of the box it opens Quick Actions, a small palette at the Pencil's tip:

ButtonWhat it does
UndoTakes back your last change. Dimmed when there's nothing to undo.
RedoPuts back the change you undid. Dimmed when there's nothing to redo.
DuplicatePuts a copy of the selected views right after them, like ⌘D. Dimmed until you select a view.
DeleteDeletes the selected views, like ⌘⌫. Undo brings them back. Dimmed until you select a view.
Add ComponentOpens Components in the left panel with the cursor in Search components. Write the component's name there with the Pencil, then tap its tile.
PreviewRuns your app in Preview, like ⌘R.

Tap a button and the palette closes. To close it without choosing, squeeze again or tap anywhere else. If the Pencil isn't over the screen when you squeeze, the palette opens in the middle of the canvas.

#Choose what double-tap and squeeze do

Open Settings from the sidebar. The Apple Pencil group has a menu for each gesture: tap Double-Tap or Squeeze, then choose.

Settings' Apple Pencil group: Double-Tap, Squeeze, Hover Outline and Select with Pencil Only, with which Pencils each needs.
ChoiceWhat it does
Quick ActionsOpens the palette at the Pencil's tip. See Squeeze.
UndoTakes back your last change.
RedoPuts back the change you undid.
DuplicateCopies the selected views, right after them.
DeleteDeletes the selected views.
Select What It's InSelects the container the selected view is in, like ← on a keyboard. Handy for picking a Column or Row whose views fill it.
Add ComponentOpens Components, ready to search.
PreviewRuns your app in Preview.
Do NothingThe gesture does nothing in the Builder.

#Hover Outline

While the Pencil hovers just above the screen, the view under its tip gets a thin outline and a tag with its name. That's the view a tap there would select. A trackpad's pointer does the same.

The Pencil hovering over a Column named Tip: a thin outline, and a tag that says Tip.

To turn it off, switch off Hover Outline in Settings › Apple Pencil.

#Select with Pencil Only

Rest your hand on the screen while you work? Switch on Select with Pencil Only in Settings › Apple Pencil. It's off to start with. While it's on:

  • On the canvas, only the Pencil (or a trackpad or mouse) selects and moves views. A finger's tap doesn't select, deselect or start a move, and touching and holding a view with a finger doesn't lift it.
  • Fingers still scroll the screen, drag the empty canvas around, and pinch and use two fingers to zoom and pan.
  • The Library, Layers, the Inspector and the toolbar work with fingers as usual.

#Barrel roll

Apple Pencil Pro also senses when you turn it in your fingers. The Builder doesn't use that.

#Pencil gestures in your own apps

Your app can react to Apple Pencil too: When Apple Pencil Is Double-Tapped, When Apple Pencil Is Squeezed and When Hovered. They run in Preview and in My Apps. In the Builder, the Pencil's double-tap and squeeze do what you chose in Settings instead.

#See also