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

# action

The default action-message selector associated with the control.

```
var action: Selector? { get set }
```

## Discussion

This property contains the action message selector of the receiver’s cell. Controls that support multiple cells (such as `NSMatrix` and `NSForm`) must supply the appropriate action-message selector in this property. Specify `NULL` to prevent action messages from being sent to the receiver’s target.

If you want the action-message selector for a control that has multiple cells, it is better to get the selector directly from the cell’s own `action` property.

---

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)