UIAlertController
class UIAlertController : UIViewController
-
Creates an alert view controller with a single confirmation button.
Declaration
Swift
static func singleActionAlertController(title: String, message: String) -> UIAlertControllerParameters
titleTitle of the controller.
messageMessage of the controller.
Return Value
Configured UIAlertController.
-
Creates an alert view controller with a destructive action.
Declaration
Swift
static func deleteActionAlertController(title: String? = nil, message: String? = nil, deleteTitle: String?, handler: ((UIAlertAction) -> Void)? = nil) -> UIAlertControllerParameters
titleOptional title of controller.
messageOptional message of controller.
deleteTitleTitle of destructive button.
handlerHandler.
Return Value
Configured UIAlertController.
-
Creates an alert view controller with dobule confirmation buttons.
Declaration
Swift
static func doubleActionAlertController(title: String, message: String, actionOneTitle: String, actionTwoTitle: String, actionOne: (() -> Void)? = nil, actionTwo: (() -> Void)? = nil) -> UIAlertControllerParameters
titleTitle of the controller.
messageMessage of the controller.
actionOneTitleAlert action one title.
actionTwoTitleAlert action two title.
actionOneAlert action associated with action one button.
actionTwoAlert action associated with action two button.
Return Value
Configured UIAlertController.
-
doubleButtonActionSheet(title:message:buttonOneTitle:buttonTwoTitle:actionButtonStyle:actionOne:actionTwo:cancelButtonTitle:)Creates an alert view controller with double confirmation buttons and a cancel button.
Declaration
Swift
static func doubleButtonActionSheet(title: String? = nil, message: String? = nil, buttonOneTitle: String, buttonTwoTitle: String, actionButtonStyle: UIAlertActionStyle = .default, actionOne: (() -> Void)? = nil, actionTwo: (() -> Void)? = nil, cancelButtonTitle: String) -> UIAlertControllerParameters
titleTitle of the controller.
messageMessage of the controller.
buttonOneTitleAlert action button one title.
buttonTwoTitleAlert action button two title.
actionButtonStyleAction button style.
actionOneAlert action associated with action one button.
actionTwoAlert action associated with action two button.
cancelButtonTitleCancel button title.
Return Value
Configured UIAlertController.
UIAlertController Extension Reference