AlertManager

public final class AlertManager

Manager for posting alerts to the user. The plumbing guarantees that only one alert will happen at a time – others will queue until it is their turn to be shown. Although this works, there is the risk of annoying the user with a crapload of alerts because of some catastrophic failure.

  • Construct a new manager that uses the given view controller for presenting new alerts. Watch for certain notifications to fire, and post an alert when they do.

    Declaration

    Swift

    public init(presenter: UIViewController)

    Parameters

    presenter

    the view controller to use for presenting

  • Post an alert to the user

    Declaration

    Swift

    public func post(alert: AlertConfig)

    Parameters

    alert

    the contents of the alert to show