StepAssembly
@MainActor
public final class StepAssembly<F: Finder, FC: AbstractFactory>: GenericStepAssembly<F.ViewController, FC.Context>
where
F.ViewController == FC.ViewController, F.Context == FC.Context
Builds a DestinationStep instance with the correct settings into a chain of steps.
NB
Both Finder and Factory instances should deal with the same type of UIViewController and Context instances.
Usage
let productScreen = StepAssembly(finder: ProductViewControllerFinder(), factory: ProductViewControllerFactory())
.adding(LoginInterceptor())
.adding(ProductViewControllerContextTask())
.adding(ProductViewControllerPostTask(analyticsManager: AnalyticsManager.sharedInstance))
.using(.push)
.from(.navigationController)
.using(.present)
.from(.current)
.assemble()
-
Enables shorthand
.using(.present(...))by providing a concrete expected type.Declaration
Swift
@MainActor final func using(_ action: ViewControllerActions.PresentModallyAction) -> StepChainAssembly<ViewController, Context> -
Enables shorthand
.using(.replaceRoot(...))Declaration
Swift
@MainActor final func using(_ action: ViewControllerActions.ReplaceRootAction) -> StepChainAssembly<ViewController, Context> -
Enables shorthand
.using(.nilAction)Declaration
Swift
@MainActor final func using(_ action: ViewControllerActions.NilAction) -> StepChainAssembly<ViewController, Context>
-
Enables shorthand
.using(.presentModally(...))by providing a concrete expected type.Declaration
Swift
@MainActor final func using(_ action: ViewControllerActions.PresentModallyAction) -> StepChainAssembly<ViewController, Context> -
Enables shorthand
.using(.replaceRoot(...))Declaration
Swift
@MainActor final func using(_ action: ViewControllerActions.ReplaceRootAction) -> StepChainAssembly<ViewController, Context> -
Enables shorthand
.using(.nilAction)Declaration
Swift
@MainActor final func using(_ action: ViewControllerActions.NilAction) -> StepChainAssembly<ViewController, Context>
-
Enables shorthand
.using(.push)by providing a concrete expected type.Declaration
Swift
@MainActor final func using(_ action: NavigationControllerActions.PushAction<UINavigationController>) -> ContainerStepChainAssembly<UINavigationController, ViewController, Context> -
Enables shorthand
.using(.pushAsRoot)Declaration
Swift
@MainActor final func using(_ action: NavigationControllerActions.PushAsRootAction<UINavigationController>) -> ContainerStepChainAssembly<UINavigationController, ViewController, Context> -
Enables shorthand
.using(.pushReplacingLast)Declaration
Swift
@MainActor final func using(_ action: NavigationControllerActions.PushReplacingLastAction<UINavigationController>) -> ContainerStepChainAssembly<UINavigationController, ViewController, Context>
-
Enables shorthand
.using(.push)by providing a concrete expected type.Declaration
Swift
@MainActor final func using(_ action: NavigationControllerActions.PushAction<UINavigationController>) -> ContainerStepChainAssembly<UINavigationController, ViewController, Context> -
Enables shorthand
.using(.pushAsRoot)Declaration
Swift
@MainActor final func using(_ action: NavigationControllerActions.PushAsRootAction<UINavigationController>) -> ContainerStepChainAssembly<UINavigationController, ViewController, Context> -
Enables shorthand
.using(.pushReplacingLast)Declaration
Swift
@MainActor final func using(_ action: NavigationControllerActions.PushReplacingLastAction<UINavigationController>) -> ContainerStepChainAssembly<UINavigationController, ViewController, Context>
-
Enables shorthand
.using(.addTab)by providing a concrete expected type.Declaration
Swift
@MainActor final func using(_ action: TabBarControllerActions.AddTabAction<UITabBarController>) -> ContainerStepChainAssembly<UITabBarController, ViewController, Context>
-
Enables shorthand
.using(.addTab)by providing a concrete expected type.Declaration
Swift
@MainActor final func using(_ action: TabBarControllerActions.AddTabAction<UITabBarController>) -> ContainerStepChainAssembly<UITabBarController, ViewController, Context>
-
Enables shorthand
.using(.setAsPrimary)by providing a concrete expected type.Declaration
Swift
@MainActor final func using(_ action: SplitViewControllerActions.SetAsMasterAction<UISplitViewController>) -> ContainerStepChainAssembly<UISplitViewController, ViewController, Context> -
Enables shorthand
.using(.pushToDetails)Declaration
Swift
@MainActor final func using(_ action: SplitViewControllerActions.PushToDetailsAction<UISplitViewController>) -> ContainerStepChainAssembly<UISplitViewController, ViewController, Context> -
Enables shorthand
.using(.pushOnToDetails)Declaration
Swift
@MainActor final func using(_ action: SplitViewControllerActions.PushOnToDetailsAction<UISplitViewController>) -> ContainerStepChainAssembly<UISplitViewController, ViewController, Context>
-
Enables shorthand
.using(.push)by providing a concrete expected type.Declaration
Swift
@MainActor final func using(_ action: SplitViewControllerActions.SetAsMasterAction<UISplitViewController>) -> ContainerStepChainAssembly<UISplitViewController, ViewController, Context> -
Enables shorthand
.using(.pushToDetails)Declaration
Swift
@MainActor final func using(_ action: SplitViewControllerActions.PushToDetailsAction<UISplitViewController>) -> ContainerStepChainAssembly<UISplitViewController, ViewController, Context> -
Enables shorthand
.using(.pushOnToDetails)Declaration
Swift
@MainActor final func using(_ action: SplitViewControllerActions.PushOnToDetailsAction<UISplitViewController>) -> ContainerStepChainAssembly<UISplitViewController, ViewController, Context>
-
Connects previously provided
DestinationStepinstance with anActionDeclaration
Swift
@_disfavoredOverload @MainActor final func using(_ action: some Action) -> StepChainAssembly<ViewController, Context>Parameters
actionActioninstance to be used with a step. -
Connects previously provided
DestinationStepinstance with anActionDeclaration
Swift
@_disfavoredOverload @MainActor final func using<A>(_ action: A) -> ContainerStepChainAssembly<A.ViewController, ViewController, Context> where A : ContainerActionParameters
actionContainerActioninstance to be used with a step.
-
Constructor
Declaration
Swift
@MainActor convenience init(finder: F, factory: FC)Parameters
finderThe
UIViewControllerFinderinstance.factoryThe
UIViewControllerContainerFactoryinstance. -
Connects previously provided
DestinationStepinstance with anActionDeclaration
Swift
@_disfavoredOverload @MainActor final func using(_ action: some Action) -> StepChainAssembly<ViewController, Context>Parameters
actionActioninstance to be used with a step. -
Connects previously provided
DestinationStepinstance with anActionDeclaration
Swift
@_disfavoredOverload @MainActor final func using<A>(_ action: A) -> ContainerStepChainAssembly<A.ViewController, ViewController, Context> where A : ContainerActionParameters
actionContainerActioninstance to be used with a step.
-
Connects previously provided
ActionToStepIntegratorwithNilEntityfactory with a step where theUIViewControllershould avoid type checks Example:UIViewControllerinstance was loaded as a part of the stack inside of the storyboard.Declaration
Swift
@MainActor final func from(_ step: ActionToStepIntegrator<some UIViewController, Context>) -> ActionConnectingAssembly<ViewController, Context>Parameters
stepActionToStepIntegratorinstance to be used. -
Connects previously provided
DestinationStepwithNilEntityfactory with a step where theUIViewControllershould avoid type checks Example:UIViewControllerinstance was loaded as a part of the stack inside of the storyboard.Declaration
Swift
@MainActor final func from(_ step: DestinationStep<some UIViewController, Context>) -> LastStepInChainAssembly<ViewController, Context>Parameters
stepDestinationStepinstance to be used.
-
Connects previously provided
ActionToStepIntegratorwithNilEntityfactory with a step where theUIViewControllershould avoid type checks.Declaration
Swift
@MainActor final func from(_ step: ActionToStepIntegrator<some UIViewController, Context>) -> ActionConnectingAssembly<ViewController, Context>Parameters
stepActionToStepIntegratorinstance to be used. -
Connects previously provided
DestinationStepwithNilEntityfactory with a step where theUIViewControllershould avoid type checksDeclaration
Swift
@MainActor final func from(_ step: DestinationStep<some UIViewController, Context>) -> LastStepInChainAssembly<ViewController, Context>Parameters
stepDestinationStepinstance to be used.