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

# controlTextDidBeginEditing:

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

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

## Parameters

`obj`

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

## Discussion

This method is invoked when the user begins editing text in a control such as a text field or a form field. The control posts a <doc://com.apple.documentation/documentation/AppKit/NSControl/textDidBeginEditingNotification> 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.

See [`controlTextDidEndEditing:`](/documentation/ObjectiveC/NSObject-swift.class/controlTextDidEndEditing:) for an explanation of why you may not always get one invocation of [`controlTextDidBeginEditing:`](/documentation/ObjectiveC/NSObject-swift.class/controlTextDidBeginEditing:) for each invocation of [`controlTextDidEndEditing:`](/documentation/ObjectiveC/NSObject-swift.class/controlTextDidEndEditing:).

---

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)