Pencil Interactions

Handle double-tap user interactions on Apple Pencil.


Pencil interactions let your app detect double taps the user makes on their Apple Pencil. Supporting Pencil interactions in your app gives the user a quick way to perform an action such as switching between drawing tools by simply double-tapping their Apple Pencil.

Figure 1

Double-tap the Pencil to access functionality within your app

An illustration of a hand double-tapping an Apple Pencil with the index finger.

To receive the double tap, add a UIPencilInteraction object to your app's view. To receive screen touches that a user makes using Apple Pencil, handle the touch events in your view. To learn more about handling touches, see Touches, Presses, and Gestures.


First Steps

Handling Double Taps from Apple Pencil

Detect and respond to double taps a user makes on Apple Pencil.

Handling Input from Apple Pencil

Learn how to detect and respond to touches from Apple Pencil.



An interaction that tells your app the user double-tapped their Apple Pencil.


The interface an object implements to handle double taps the user makes on their Apple Pencil.

See Also

User Interactions

Touches, Presses, and Gestures

Encapsulate your app's event-handling logic in gesture recognizers so that you can reuse that code throughout your app.

Drag and Drop

Bring drag and drop to your app by using interaction APIs with your views.

Pointer Interactions

Support pointer interactions in your custom controls and views.

Focus-based Navigation

Navigate the interface of your UIKit app using a remote or a game controller.

Menus and Shortcuts

Simplify interactions with your app using menu systems, contextual menus, Home screen quick actions, and keyboard shortcuts.


Make your apps accessible to everyone, including people with disabilities.