<!--
{
  "availability" : [
    "iOS: 4.0.0 - 10.0.0",
    "iPadOS: 4.0.0 - 10.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "watchOS: 2.0.0 - 3.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UILocalNotification/alertAction",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UILocalNotification(py)alertAction"
  },
  "title" : "alertAction"
}
-->

# alertAction

The title of the action button or slider.

```
var alertAction: String? { get set }
```

## Discussion

Assign a string or, preferably, a localized-string key (using <doc://com.apple.documentation/documentation/Foundation/NSLocalizedString>) as the value. The alert action is the title of the right button of the alert or the value of the unlock slider, where the value replaces “unlock” in “slide to unlock”. If you specify `nil`, and [`alertBody`](/documentation/UIKit/UILocalNotification/alertBody) is non-`nil`, “View” (localized to the preferred language) is used as the default value.

---

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)