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

# contextMenuInteraction(_:willEndFor:animator:)

Informs the delegate when a menu display ends.

## Declaration

```swift
optional func contextMenuInteraction(_ interaction: UIContextMenuInteraction, willEndFor 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(_:willDisplayMenuFor:animator:)](uikit/uicontextmenuinteractiondelegate/contextmenuinteraction(_:willdisplaymenufor:animator:).md)
- [UIContextMenuInteractionAnimating](uikit/uicontextmenuinteractionanimating.md)
