AlertViewController

open class AlertViewController : NibViewController
extension AlertViewController: AlertEmbeddableViewControllerDelegate

A container NibViewController that contains an AlertEmbeddableViewController

  • View container for non-full screen AlertEmbeddableViewController

    Declaration

    Swift

    @IBOutlet
    public weak var containerView: UIView!
  • Defines the corner radius of the viewContainer

    Declaration

    Swift

    public var containerViewCornerRadius: CGFloat
  • Defines if AlertEmbeddableViewController should be displayed full screen

    Declaration

    Swift

    public var isFullScreen: Bool { get set }
  • Defines if AlertEmbeddableViewController should be fit to the AlertViewController layout.

    Declaration

    Swift

    public var fitEmbeddedViewToLayout: Bool { get set }
  • Declaration

    Swift

    public var embeddedView: AlertEmbeddableViewController?
  • Declaration

    Swift

    override public init()
  • Declaration

    Swift

    override public init(nibName: String)
  • Undocumented

    Declaration

    Swift

    override public init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?)
  • Undocumented

    Declaration

    Swift

    public required init?(coder: NSCoder)
  • Undocumented

    Declaration

    Swift

    public convenience init(embeddedView: AlertEmbeddableViewController,
                            isFullScreen: Bool,
                            fitEmbeddedViewToLayout: Bool = true)
  • Declaration

    Swift

    override open func setup()
  • Sets up the delegate of the embeddedView and embeds it in its respective parent view depending on the value of isFullScreen

    Declaration

    Swift

    open func setupEmbeddedView()
  • Sets up the presentation and transition style of the AlertViewController.

    Declaration

    Swift

    open func setupPresentationAndTransitionStyle()
  • Sets up the height and width constraints of the view container.

    Depending on the value of fitEmbeddedViewToLayout, the width and height constraints will either be activated or deactivated.

    Declaration

    Swift

    open func setupEmbeddedViewLayoutFit()
  • Declaration

    Swift

    public func dismissAlert(completion: (() -> Void)?)
  • Returns an AlertViewController with an embedded GenericAlertViewController that displays a heading message, an optional subheading, and a single button

    Declaration

    Swift

    public static func message(heading: String,
                               subheading: String = "",
                               actionText: String = "Generic.Okay".localized,
                               isFullScreen: Bool = false,
                               action: (() -> Void)? = nil) -> AlertViewController

    Parameters

    heading

    Heading message

    subheading

    (Optional) Subheading message

    actionText

    (Optional) Custom button text

    isFullScreen

    (Optional) Boolean to override the AlertViewController isFullScreen property

    action

    (Optional) Closure to be executed once the button was tapped

  • Returns an AlertViewController with an embedded GenericAlertViewController that displays a heading message, an optional subheading, and a couple of buttons

    Declaration

    Swift

    public static func confirmation(heading: String,
                                    subheading: String = "",
                                    confirmText: String = "Generic.Confirm".localized,
                                    cancelText: String = "Generic.Cancel".localized,
                                    isFullScreen: Bool = false,
                                    action: ((Int) -> Void)? = nil) -> AlertViewController

    Parameters

    heading

    Heading message

    subheading

    (Optional) Subheading message

    confirmText

    (Optional) Custom confirm button text

    cancelText

    (Optional) Custom cancel button text

    isFullScreen

    (Optional) Boolean to override the AlertViewController isFullScreen property

    action

    (Optional) Closure to be executed once the button was tapped that returns the index of the tapped button

  • Returns an AlertViewController with an embedded UpgradeCheckViewController that displays a full screen view that blocks the user and forces them to upgrade the application

    Declaration

    Swift

    public static func forcedUpgradeCheck(heading: String = "UpgradeCheck.UpgradeRequired".localized,
                                          subheading: String = "UpgradeCheck.NewVersionAvailable".localized,
                                          upgradeNowText: String = "UpgradeCheck.UpgradeNow".localized,
                                          appLink: String,
                                          isFullScreen: Bool = true) -> AlertViewController

    Parameters

    heading

    (Optional) Heading message

    subheading

    (Optional) Subheading message

    upgradeNowText

    (Optional) Custom upgrade now button text

    appLink

    URL of the application in the app store

    isFullScreen

    (Optional) Boolean to override the AlertViewController isFullScreen property

  • Returns an AlertViewController with an embedded UpgradeCheckViewController that displays a full screen view that suggests an application upgrade to the user

    Declaration

    Swift

    public static func upgradeCheck(heading: String = "UpgradeCheck.SuggestedUpgrade".localized,
                                    subheading: String = "UpgradeCheck.NewVersionAvailable".localized,
                                    upgradeNowText: String = "UpgradeCheck.UpgradeNow".localized,
                                    upgradeLaterText: String = "UpgradeCheck.UpgradeLater".localized,
                                    appLink: String,
                                    isFullScreen: Bool = true) -> AlertViewController

    Parameters

    heading

    (Optional) Heading message

    subheading

    (Optional) Subheading message

    upgradeNowText

    (Optional) Custom upgrade now button text

    upgradeLaterText

    (Optional) Custom upgrade later button text

    appLink

    URL of the application in the app store

    isFullScreen

    (Optional) Boolean to override the AlertViewController isFullScreen property

  • Undocumented

    Declaration

    Swift

    public static func loading(loadingText: String? = nil,
                               isFullScreen: Bool = false) -> AlertViewController