Contents

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 nil if it doesn’t have a delegate.

  • cancelButtonTitle:

    The title of the cancel button or nil if 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.

See Also

Creating alert views