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.
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.