Instance Method


Attaches an action object to the alert or action sheet.


- (void)addAction:(UIAlertAction *)action;



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.

See Also

Configuring the User Actions


The actions that the user can take in response to the alert or action sheet.


The preferred action for the user to take from an alert.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software