MimiUserFlowCoordinator

public final class MimiUserFlowCoordinator : NSObject
extension MimiUserFlowCoordinator: UINavigationControllerDelegate

Coordinator which translates the on screen navigation stack and its interactions from a UINavigationController to a UserFlow.

  • Flow that is being coordinated.

    Declaration

    Swift

    public let flow: MimiUserFlow
  • A location in the flow.

    • next: The next step (if available).
    • previous: The previous step (if available).
    • start: The start of the current flow.
    • parent: The parent of the current flow (if available).
    • root: The root of all flows.
    • last: The last step that is of the type specified.
    Declaration

    Swift

    public enum FlowLocation
  • Jump the coordinator to a new location in the flow.

    Throws

    Error if jump could not be achieved.
    Declaration

    Swift

    public func jump(to location: FlowLocation, // swiftlint:disable:this cyclomatic_complexity function_body_length
                     animated: Bool = true) throws
    Parameters
    location

    New location.

    animated

    Whether to animate the jump.

  • Push a new Child Flow in the current parent flow.

    Throws

    Error if Child Flow could not be pushed.
    Declaration

    Swift

    public func push(childFlow: MimiUserFlow,
                     animated: Bool = true,
                     hidesBackButton: Bool = false) throws
    Parameters
    childFlow

    Child Flow to push.

    animated

    Whether to animate the push.

    hidesBackButton

    Whether to hide the back button when pushed, disabling the user from going back.