UIAlertController
public extension UIAlertController
-
Adds an action to
self
with the specified title, style, and handler.Date
February 17, 2016Declaration
Swift
func addAction(title: String, style: UIAlertAction.Style, handler: ((UIAlertAction) -> Void)?)
Parameters
title
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.
style
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
UIAlertActionStyle
.handler
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.