<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextFieldDelegate/textField(_:willDismissEditMenuWith:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITextFieldDelegate(im)textField:willDismissEditMenuWithAnimator:"
  },
  "title" : "textField(_:willDismissEditMenuWith:)"
}
-->

# textField(_:willDismissEditMenuWith:)

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

```
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.

---

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)