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

# textFieldDidEndEditing(_:)

Tells the delegate when editing stops for the specified text field.

```
optional func textFieldDidEndEditing(_ textField: UITextField)
```

## Parameters

`textField`

The text field for which editing ended.

## Discussion

This method is called after the text field resigns its first responder status. You can use this method to update your delegate’s state information. For example, you might use this method to hide overlay views that should be visible only while editing.

Implementation of this method by the delegate is optional. If your delegate also implements the [`textFieldDidEndEditing(_:reason:)`](/documentation/UIKit/UITextFieldDelegate/textFieldDidEndEditing(_:reason:)) method, UIKit calls that method in preference to this one.

---

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)