<!--
{
  "documentType" : "article",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/apple-pencil-interactions",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Apple Pencil interactions"
}
-->

# Apple Pencil interactions

Handle user interactions like double tap and squeeze on Apple Pencil.

## Discussion

Apple Pencil interactions let a person perform certain actions in your app by double-tapping or squeezing an Apple Pencil. Support Apple Pencil interactions to give people a quick way to perform their preferred action, such as switching between drawing tools, or a custom action that you define in your app.

![Two illustrations showing a hand double-tapping Apple Pencil with the index finger and a hand squeezing Apple Pencil near the tip.](images/com.apple.uikit/media-4403818@2x.png)

- To learn more about supporting double-tap and squeeze interactions, read <doc://com.apple.documentation/documentation/ApplePencil/handling-double-taps-from-apple-pencil> and <doc://com.apple.documentation/documentation/ApplePencil/handling-squeezes-from-apple-pencil>.
- To learn more about handling touches, read [Handling input from Apple Pencil](/documentation/UIKit/handling-input-from-apple-pencil).
- To learn more about incorporating hand-drawn content in your app, see <doc://com.apple.documentation/documentation/PencilKit/drawing-with-pencilkit>.

> Note:
> Only Apple Pencil Pro supports squeeze interactions. The first-generation Apple Pencil doesn’t support Apple Pencil interactions.

## Topics

### Essentials

  <doc://com.apple.documentation/documentation/ApplePencil/handling-double-taps-from-apple-pencil>

  <doc://com.apple.documentation/documentation/ApplePencil/handling-squeezes-from-apple-pencil>

[Handling input from Apple Pencil](/documentation/UIKit/handling-input-from-apple-pencil)

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

### Apple Pencil interactions in SwiftUI

  <doc://com.apple.documentation/documentation/SwiftUI/View/onPencilDoubleTap(perform:)>

  <doc://com.apple.documentation/documentation/SwiftUI/PencilDoubleTapGestureValue>

  <doc://com.apple.documentation/documentation/SwiftUI/View/onPencilSqueeze(perform:)>

  <doc://com.apple.documentation/documentation/SwiftUI/PencilSqueezeGesturePhase>

  <doc://com.apple.documentation/documentation/SwiftUI/PencilSqueezeGestureValue>

  <doc://com.apple.documentation/documentation/SwiftUI/PencilPreferredAction>

  <doc://com.apple.documentation/documentation/SwiftUI/PencilHoverPose>

### Apple Pencil interactions in UIKit

[`UIPencilInteraction`](/documentation/UIKit/UIPencilInteraction)

An interaction that tells your app when a person double-taps or squeezes Apple Pencil.

[`UIPencilInteractionDelegate`](/documentation/UIKit/UIPencilInteractionDelegate)

The interface an object implements to handle double taps or squeezes a person makes on Apple Pencil.

[`UIPencilInteraction.Tap`](/documentation/UIKit/UIPencilInteraction/Tap)

An interaction that represents a double tap on Apple Pencil.

[`UIPencilInteraction.Squeeze`](/documentation/UIKit/UIPencilInteraction/Squeeze)

An interaction that represents a squeeze on Apple Pencil.

[`UIPencilInteraction.Phase`](/documentation/UIKit/UIPencilInteraction/Phase)

Constants that describe the phases of an interaction on Apple Pencil.

[`UIPencilHoverPose`](/documentation/UIKit/UIPencilHoverPose)

An object that describes the hover pose of Apple Pencil during an interaction like double tap or squeeze.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)