Handle double-tap interactions that a user makes on Apple Pencil.
Framework
- UIKit
Overview
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.
Double-tap the Pencil to access functionality within your app

To receive the double tap, add a UIPencil
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.
Note
The first generation Apple Pencil doesn’t support Pencil interactions.