MimiUserFlow
open class MimiUserFlow : NSObject, MimiThemeable, FlowPresentationControllerHandlerDelegate
A sequential flow of ‘steps’ which correspond to visible view controllers on screen.
-
Number of steps in the flow.
Declaration
Swift
public var count: Int { get } -
Index of the currently selected step in the flow.
Declaration
Swift
public var currentIndex: Int? { get } -
Object that acts as a delegate to the user flow.
Declaration
Swift
public weak var delegate: MimiUserFlowDelegate? -
Presentation style to use if flow is presented modally.
Declaration
Swift
public var modalPresentationStyle: UIModalPresentationStyle? -
Transition style to use if flow is presented modally.
Declaration
Swift
public var modalTransitionStyle: UIModalTransitionStyle? -
Object that acts as a transitioning delegate to the view controller if the flow is presented.
Declaration
Swift
public weak var transitioningDelegate: UIViewControllerTransitioningDelegate? -
Type of UINavigationBar to use if presented.
Declaration
Swift
open var navigationBarClass: UINavigationBar.Type? { get } -
Parent user flow that pushed this flow as a child.
Declaration
Swift
open internal(set) weak var parent: MimiUserFlow? { get } -
View Controller that is the root of the flow.
This view controller will be persistent for the whole lifecycle of the flow when set. Suitable for use as a presentingViewController.
Declaration
Swift
open weak private(set) var rootViewController: UIViewController? { get }
-
User flow will appear.
Declaration
Swift
open func willAppear(animated: Bool)Parameters
animatedWhether the appearance will be animated.
-
User flow did appear.
Declaration
Swift
open func didAppear(animated: Bool)Parameters
animatedWhether the appearance will be animated.
-
User flow will be dismissed.
Declaration
Swift
open func willDismiss(animated: Bool)Parameters
animatedWhether the dismissal will be animated.
-
User flow was dismissed.
Declaration
Swift
open func didDismiss(animated: Bool)Parameters
animatedWhether the dismissal was animated.
-
Add a step to the user flow.
Declaration
Swift
public func step(_ step: MimiUserFlowSteppable) -> SelfParameters
stepStep to add.
-
Add a step to the user flow depending on a boolean decision.
Declaration
Swift
public func step(_ step: MimiUserFlowSteppable, if decision: @escaping () -> Bool) -> SelfParameters
stepStep to add.
decisionDecision logic.
-
Add a step or another candidate to the user flow depending on a decision.
Declaration
Swift
public func step(_ step: MimiUserFlowSteppable, or other: MimiUserFlowSteppable, decision: @escaping (MimiUserFlowSteppable, MimiUserFlowSteppable) -> MimiUserFlowSteppable?) -> SelfParameters
stepFirst step candidate.
otherSecondary step candidate.
decisionDecision logic.
-
Push a flow into an existing navigation controller.
Declaration
Swift
open func push(in navigationController: UINavigationController?, animated: Bool)Parameters
navigationControllerThe navigation controller to push into.
animatedWhether to animate the push.
-
Create the view controller which contains the flow.
Note: This view controller will internally manage navigation and should not really be embedded within another navigation controller.
Declaration
Swift
open func makeFlowViewController() throws -> UIViewControllerReturn Value
Flow view controller.
-
Present a flow from a view controller.
Declaration
Swift
open func present(from presentingviewController: UIViewController, animated: Bool, completion: (() -> Void)?)Parameters
presentingviewControllerView controller to present from.
animatedWhether to animate the presentation.
completionCompletion of the presentation.
-
Add the flow as a child view controller of another view controller.
Note
If you pass
nilas thelayoutparamter, the view controller will be constrained to all edge anchors of the parent view controller.Declaration
Swift
open func addAsChild(to viewController: UIViewController, layout: ((_ parent: UIViewController, _ view: UIView) -> Void)? = nil)Parameters
viewControllerView controller to add as child to.
layoutClosure to execute custom layout logic.
-
Dismiss the flow if visible.
Declaration
Swift
open func dismiss(animated: Bool, completion: (() -> Void)?)Parameters
animatedWhether to animate the dismissal.
completionCompletion of the dismissal.
-
Interaction controller to use with a custom animation controller.
Declaration
Swift
open func interactionController(for animationController: UIViewControllerAnimatedTransitioning, in navigationController: UINavigationController) -> UIViewControllerInteractiveTransitioning?Parameters
animationControllerAnimation controller.
navigationControllerNavigation controller.
Return Value
Custom interaction controller to use.
MimiUserFlow Class Reference