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

# textDidBeginEditing(_:)

Invoked when there’s a change in the text after the receiver gains first responder status.

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

## Parameters

`notification`

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

## Discussion

This method’s default behavior is to post an [`textDidBeginEditingNotification`](/documentation/AppKit/NSControl/textDidBeginEditingNotification) 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.

---

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)