init(title:message:delegate:cancelButtonTitle:)
Convenience method for initializing an alert view.
Declaration
convenience init(title: String?, message: String?, delegate: Any?, cancelButtonTitle: String?)Parameters
- title:
The string that appears in the receiver’s title bar.
- message:
Descriptive text that provides more details than the title.
- delegate:
The receiver’s delegate or
nilif it doesn’t have a delegate. - cancelButtonTitle:
The title of the cancel button or
nilif there’s no cancel button.Using this argument is equivalent to setting the cancel button index to the value returned by invoking Addbutton(withtitle:) specifying this title.
Return Value
Newly initialized alert view.