UIKitPresenter
open class UIKitPresenter : OrchestrationResponder
An OrchestrationResponder
that interacts with UIKit.
-
Creates a
UIKitPresenter
that can respond to aWorkflow
‘s actions.Declaration
Swift
public init(_ viewController: UIViewController, launchStyle: LaunchStyle.PresentationType)
Parameters
viewController
the
UIViewController
that aWorkflow
should launch from.launchStyle
the
LaunchStyle.PresentationType
to use to launch theWorkflow
. -
Launches a
FlowRepresentable
that is also aUIViewController
.Declaration
Swift
public func launch(to: AnyWorkflow.Element)
-
Proceeds in the
Workflow
by presenting the nextFlowRepresentable
that is also aUIViewController
.Declaration
Swift
public func proceed(to: AnyWorkflow.Element, from: AnyWorkflow.Element)
-
Back up in the
Workflow
by dismissing or popping theFlowRepresentable
that is also aUIViewController
.Declaration
Swift
public func backUp(from: AnyWorkflow.Element, to: AnyWorkflow.Element)
-
Abandons the
Workflow
by 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
workflow
AnyWorkflow
being completed.passedArgs
arguments to pass to
onFinish
.onFinish
closure provided when launching
workflow
.