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

# textDidEndEditing(_:)

Invoked when text editing ends.

```
func textDidEndEditing(_ notification: Notification)
```

## Parameters

`notification`

The [`textDidEndEditingNotification`](/documentation/AppKit/NSControl/textDidEndEditingNotification) notification.

## Discussion

This method’s default behavior is to post an [`textDidEndEditingNotification`](/documentation/AppKit/NSControl/textDidEndEditingNotification) along with the receiving object to the default notification center. The posted notification’s user info contains the contents of notification’s user info dictionary, plus an additional key-value pair. The additional key is “`NSFieldEditor`”; the value for this key is the text object that began editing. After posting the notification, [`NSMatrix`](/documentation/AppKit/NSMatrix) sends an [`endEditing(_:)`](/documentation/AppKit/NSCell/endEditing(_:)) message to the selected cell, draws and makes the selected cell key, and then takes the appropriate action based on which key was used to end editing (Return, Tab, or Back-Tab).

---

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)