<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.0.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObject-swift.class/controlTextDidEndEditing:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Objective-C Runtime"
    ],
    "preciseIdentifier" : "c:objc(cs)NSObject(im)controlTextDidEndEditing:"
  },
  "title" : "controlTextDidEndEditing:"
}
-->

# controlTextDidEndEditing:

Sent when a control with editable text ends an editing session.

```
- (void) controlTextDidEndEditing:(NSNotification *) obj;
```

## Parameters

`obj`

The notification object. The name of the notification is always <doc://com.apple.documentation/documentation/AppKit/NSControl/textDidEndEditingNotification>.

## Discussion

This method is invoked when the user stops editing text in a control such as a text field or form. The control posts a <doc://com.apple.documentation/documentation/AppKit/NSControl/textDidEndEditingNotification> notification, and if the control’s delegate implements this method, it is automatically registered to receive the notification. Use the key `@"NSFieldEditor"` to obtain the field editor from the `userInfo` dictionary of the notification object.

> Warning:
> In some cases, such as when editing within an instance of `NSOutlineView`, this method may be invoked without a previous invocation of ``doc://com.apple.objectivec/documentation/ObjectiveC/NSObject-swift.class/controlTextDidBeginEditing:``. You will only get the `controlTextDidBeginEditing:` notification if the user actually types something, but you can get the `controlTextDidEndEditing:` notification if the user just double-clicks the field and then clicks outside the field, without typing.

---

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)