---
title: "textField(_:willDismissEditMenuWith:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitextfielddelegate/textfield(_:willdismisseditmenuwith:)"
---

# textField(_:willDismissEditMenuWith:)

Tells the delegate that the system is about to dismiss an edit menu with an animator.

## Declaration

```swift
optional func textField(_ textField: UITextField, willDismissEditMenuWith animator: any UIEditMenuInteractionAnimating)
```

## Parameters

- `textField`: The text field showing the menu.
- `animator`: The dismissal animator to add animations to, so that the animations will run alongside the dismissal transition.

## See Also

### Customizing an edit menu

- [textField(_:willPresentEditMenuWith:)](uikit/uitextfielddelegate/textfield(_:willpresenteditmenuwith:).md)
