One Logo Pool Ball
SwiftUI · IOS API REFERENCE

PencilPreferredAction

struct · iOS 17.5+ · SDK 27.1

struct PencilPreferredAction

An action that the user prefers to perform after double-tapping their Apple Pencil.

Members (7)

get · iOS 17.5+

switchEraser

TypeScript
static get switchEraser(): PencilPreferredAction
Swift declaration
static let switchEraser: PencilPreferredAction

An action that switches between the current tool and the eraser.

get · iOS 17.5+

switchPrevious

TypeScript
static get switchPrevious(): PencilPreferredAction
Swift declaration
static let switchPrevious: PencilPreferredAction

An action that switches between the current tool and the last used tool.

get · iOS 17.5+

showColorPalette

TypeScript
static get showColorPalette(): PencilPreferredAction
Swift declaration
static let showColorPalette: PencilPreferredAction

An action that toggles the display of the color palette.

get · iOS 17.5+

runSystemShortcut

TypeScript
static get runSystemShortcut(): PencilPreferredAction
Swift declaration
static let runSystemShortcut: PencilPreferredAction

An action that runs a system shortcut. If the user selects this as their preferred action to perform after double-tapping or squeezing their Apple Pencil, your app will never be notified when they do. Instead, you should only use this information to remind the user about their preference in your app’s UI.

get · iOS 17.5+

showInkAttributes

TypeScript
static get showInkAttributes(): PencilPreferredAction
Swift declaration
static let showInkAttributes: PencilPreferredAction

An action that toggles the display of the current tool’s ink attributes.

get · iOS 17.5+

showContextualPalette

TypeScript
static get showContextualPalette(): PencilPreferredAction
Swift declaration
static let showContextualPalette: PencilPreferredAction

An action that toggles the display of the contextual palette, or the undo/redo panel if contextual palette is not available.

get · iOS 17.5+

ignore

TypeScript
static get ignore(): PencilPreferredAction
Swift declaration
static let ignore: PencilPreferredAction

An action that does nothing.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUI types →