Create and return an action with the specified title and behavior.
- iOS 8.0+
- tvOS 9.0+
The text to use for the button title. The value you specify should be localized for the user’s current language. This parameter must not be
nil, except in a tvOS app where a
niltitle may be used with
Action .Style .cancel
Additional styling information to apply to the button. Use the style information to convey the type of action that is performed by the button. For a list of possible values, see the constants in
A block to execute when the user selects the action. This block has no return value and takes the selected action object as its only parameter.
A new alert action object.
Actions are enabled by default when you create them.