<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSControl/endEditing(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSControl(im)endEditing:"
  },
  "title" : "endEditing(_:)"
}
-->

# endEditing(_:)

Ends the editing of text in the receiver using the specified field editor.

```
func endEditing(_ textObj: NSText)
```

## Parameters

`textObj`

The field editor currently handling the editing of the cell’s content.

## Discussion

Ends any editing of text that began with a call to [`edit(withFrame:editor:delegate:event:)`](/documentation/AppKit/NSControl/edit(withFrame:editor:delegate:event:)) or [`select(withFrame:editor:delegate:start:length:)`](/documentation/AppKit/NSControl/select(withFrame:editor:delegate:start:length:)).

---

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)