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

# textDidChange(_:)

Posts a notification when the text changes, and forwards the message to the text field’s cell if it responds.

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

## Parameters

`notification`

The [`textDidChangeNotification`](/documentation/AppKit/NSControl/textDidChangeNotification) notification to post to the default notification center.

## Discussion

This method causes the text field’s delegate to receive a <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/controlTextDidChange:> message. See the [`NSControl`](/documentation/AppKit/NSControl) class specification for more information about the text delegate method.

---

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)