---
title: "contextMenuInteraction(_:willDisplayMenuFor:animator:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicontextmenuinteractiondelegate/contextmenuinteraction(_:willdisplaymenufor:animator:)"
---

# contextMenuInteraction(_:willDisplayMenuFor:animator:)

Informs the delegate when a menu display begins.

## Declaration

```swift
optional func contextMenuInteraction(_ interaction: UIContextMenuInteraction, willDisplayMenuFor configuration: UIContextMenuConfiguration, animator: (any UIContextMenuInteractionAnimating)?)
```

## Parameters

- `interaction`: The interaction object that triggered the interaction.
- `configuration`: The context menu configuration.
- `animator`: The animator to configure custom animations.

## See Also

### Handling animations

- [contextMenuInteraction(_:willEndFor:animator:)](uikit/uicontextmenuinteractiondelegate/contextmenuinteraction(_:willendfor:animator:).md)
- [UIContextMenuInteractionAnimating](uikit/uicontextmenuinteractionanimating.md)
