---
title: alertStyle
framework: usernotifications
role: symbol
role_heading: Instance Property
path: usernotifications/unnotificationsettings/alertstyle
---

# alertStyle

The type of alert that the app may display when the device is unlocked.

## Declaration

```swift
var alertStyle: UNAlertStyle { get }
```

## Discussion

Discussion When alerts are authorized, this property specifies the presentation style for alerts when the device is unlocked. The user may choose to display alerts as automatically disappearing banners or as modal windows that require explicit dismissal. The user may also choose not to display alerts at all.

## See Also

### Getting Interface Settings

- [UNAlertStyle](usernotifications/unalertstyle.md)
- [showPreviewsSetting](usernotifications/unnotificationsettings/showpreviewssetting.md)
- [UNShowPreviewsSetting](usernotifications/unshowpreviewssetting.md)
- [providesAppNotificationSettings](usernotifications/unnotificationsettings/providesappnotificationsettings.md)
