UIAlertController

extension UIAlertController
  • This method helps to build a alert for displaying error messages.

    Declaration

    Swift

    static func errorAlert(
    	title: String? = nil,
    	message: String,
    	okTitle: String? = nil,
    	secondaryActionTitle: String? = nil,
    	completion: (() -> Void)? = nil,
    	secondaryActionCompletion: (() -> Void)? = nil
    ) -> UIAlertController

    Parameters

    title

    The title of the alert. If omitted, it will use the general error title.

    message

    The description of the alert.

    okTitle

    The text of the ok action.

    secondaryActionTitle

    The text of the secondary action, if there is one.

    hasSecondaryAction

    Indicates whether an alert has a secondary action or not.

    completion

    The completion handler for the “ok” action.

    secondaryActionCompletion

    The completion handler for the secondary action.

    Return Value

    An alert with either one or two actions, with the specified completion handlers and texts.

  • Undocumented

    Declaration

    Swift

    class func localizedHowRiskDetectionWorksAlertController(
    	maximumNumberOfDays: Int
    ) -> UIAlertController