AlertFactory

public class AlertFactory

A Factory class that returns an AlertController

  • Returns an AlertViewController with an OK button and displays a message on the view controller.

    Declaration

    Swift

    public static func makeAlert(viewController: UIViewController? = nil, message: String, buttonTitle: String) -> UIAlertController

    Parameters

    viewController

    The view controller to present the alert

    message

    The message to display

    buttonTitle

    The button title

    Return Value

    UIAlertController