---
title: alertAction
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uilocalnotification/alertaction
---

# alertAction

The title of the action button or slider.

## Declaration

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

## Discussion

Discussion Assign a string or, preferably, a localized-string key (using 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 is non-nil, “View” (localized to the preferred language) is used as the default value.

## See Also

### Composing the alert

- [alertBody](uikit/uilocalnotification/alertbody.md)
- [alertTitle](uikit/uilocalnotification/alerttitle.md)
- [hasAction](uikit/uilocalnotification/hasaction.md)
- [alertLaunchImage](uikit/uilocalnotification/alertlaunchimage.md)
- [category](uikit/uilocalnotification/category.md)
