Instance Property

isEnabled

A Boolean value indicating whether the action is currently enabled.

Declaration

var isEnabled: Bool { get set }

Discussion

The default value of this property is true. Changing the value to false causes the action to appear dimmed in the resulting alert. When an action is disabled, taps on the corresponding button have no effect.

See Also

Getting the Action’s Attributes

var title: String?

The title of the action’s button.

var style: UIAlertAction.Style

The style that is applied to the action’s button.