SimpleContainerFactory
@MainActor
public protocol SimpleContainerFactory : ContainerFactory
A helper protocol to the ContainerFactory protocol. If a container does not need to deal with the children view
controller creation, SimpleContainerFactory will handle integration of the children view controllers.
-
Type of
UIViewControllerthatSimpleContainerFactorycan buildDeclaration
Swift
associatedtype ViewController -
Contextto be passed intoUIViewControllerDeclaration
Swift
associatedtype Context
-
build(with:Default implementationintegrating: ) Builds a
UIViewControllerthat will be integrated into the stackParameters:
- context: A
Contextinstance provided to theRouter. - viewControllers:
UIViewControllerinstances to be integrated into the container as children view controllersThrows
TheRoutingErrorif the build does not succeed.
Default Implementation
Default implementation of the
ContainerFactory‘sbuildmethodDeclaration
Swift
@MainActor func build(with context: Context, integrating viewControllers: [UIViewController]) throws -> ViewControllerReturn Value
The built
UIViewControllercontainer instance. - context: A