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
UIViewController
thatSimpleContainerFactory
can buildDeclaration
Swift
associatedtype ViewController
-
Context
to be passed intoUIViewController
Declaration
Swift
associatedtype Context
-
build(with:
Default implementationintegrating: ) Builds a
UIViewController
that will be integrated into the stackParameters:
- context: A
Context
instance provided to theRouter
. - viewControllers:
UIViewController
instances to be integrated into the container as children view controllersThrows
TheRoutingError
if the build does not succeed.
Default Implementation
Default implementation of the
ContainerFactory
‘sbuild
methodDeclaration
Swift
@MainActor func build(with context: Context, integrating viewControllers: [UIViewController]) throws -> ViewController
Return Value
The built
UIViewController
container instance. - context: A