UIKitPresenter
open class UIKitPresenter : OrchestrationResponder
An OrchestrationResponder that interacts with UIKit.
-
Creates a
UIKitPresenterthat can respond to aWorkflow‘s actions.Declaration
Swift
public init(_ viewController: UIViewController, launchStyle: LaunchStyle.PresentationType)Parameters
viewControllerthe
UIViewControllerthat aWorkflowshould launch from.launchStylethe
LaunchStyle.PresentationTypeto use to launch theWorkflow. -
Launches a
FlowRepresentablethat is also aUIViewController.Declaration
Swift
public func launch(to: AnyWorkflow.Element) -
Proceeds in the
Workflowby presenting the nextFlowRepresentablethat is also aUIViewController.Declaration
Swift
public func proceed(to: AnyWorkflow.Element, from: AnyWorkflow.Element) -
Back up in the
Workflowby dismissing or popping theFlowRepresentablethat is also aUIViewController.Declaration
Swift
public func backUp(from: AnyWorkflow.Element, to: AnyWorkflow.Element) -
Abandons the
Workflowby dismissing allUIViewController‘s currently displayed by this presenter.Declaration
Swift
public func abandon(_ workflow: AnyWorkflow, onFinish: (() -> Void)?) -
Completes the workflow, making the callback at the appropriate time for UIKit.
Discussion
If the last view of the workflow has a persistence of
.removedAfterProceeding, then the view will be removed before completing.Declaration
Swift
public func complete(_ workflow: AnyWorkflow, passedArgs: AnyWorkflow.PassedArgs, onFinish: ((AnyWorkflow.PassedArgs) -> Void)?)Parameters
workflowAnyWorkflowbeing completed.passedArgsarguments to pass to
onFinish.onFinishclosure provided when launching
workflow.
View on GitHub
UIKitPresenter Class Reference