---
title: "pencilInteractionDidTap(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipencilinteractiondelegate/pencilinteractiondidtap(_:)"
---

# pencilInteractionDidTap(_:)

Tells the delegate that the user double-tapped Apple Pencil.

## Declaration

```swift
optional func pencilInteractionDidTap(_ interaction: UIPencilInteraction)
```

## Discussion

Discussion When handling the double tap, perform either: The action selected by the user in the Settings app, as specified by the preferredTapAction class property. An alternative behavior that gives the user the best experience for your app. Should you decide to support an alternative, provide an intuitive way for the user to learn about and enable that behavior.
