ErrorView

public final class ErrorView

The class to handle UI errors

  • Initializer to initialize the class with errors to be displayed and the ViewController responsible to display the errors

    Declaration

    Swift

    public init(viewController: UIViewController,
                error: HyperwalletErrorType,
                pageName: String,
                pageGroup: String)

    Parameters

    viewController

    view controller that contains errors

    error

    hyperwallet error

    pageName

    The Page or screen that is currently visible

    pageGroup

    The group of the Page or screen that is currently visible

  • To show error messages

    Declaration

    Swift

    public func show(_ handler: (() -> Void)?)

    Parameters

    handler

    handler to either remain on same UI page or go back to previous