<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIContextMenuInteractionDelegate/contextMenuInteraction(_:willPerformPreviewActionForMenuWith:animator:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIContextMenuInteractionDelegate(im)contextMenuInteraction:willPerformPreviewActionForMenuWithConfiguration:animator:"
  },
  "title" : "contextMenuInteraction(_:willPerformPreviewActionForMenuWith:animator:)"
}
-->

# contextMenuInteraction(_:willPerformPreviewActionForMenuWith:animator:)

Informs the delegate when a preview action begins.

```
optional func contextMenuInteraction(_ interaction: UIContextMenuInteraction, willPerformPreviewActionForMenuWith configuration: UIContextMenuConfiguration, animator: any UIContextMenuInteractionCommitAnimating)
```

## Parameters

`interaction`

The interaction object that triggered the interaction.

`configuration`

The context menu configuration.

`animator`

The animator to configure custom animations.

## Discussion

---

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)