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

# hasActionButton

A Boolean value that specifies whether the notification displays an action button.

```
var hasActionButton: Bool { get set }
```

## Discussion

Set to <doc://com.apple.documentation/documentation/Swift/false> if the notification has no action button. This is the case for notifications that are purely for information and have no user action. The default value is <doc://com.apple.documentation/documentation/Swift/true>.

---

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)