Attaches an action object to the alert or action sheet.
- iOS 8.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
The action object to display as part of the alert. Actions are displayed as buttons in the alert. The action object provides the button text and the action to be performed when that button is tapped.
If your alert has multiple actions, the order in which you add those actions determines their order in the resulting alert or action sheet.