SimpleContainerFactory

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.

Associated types

  • Type of UIViewController that SimpleContainerFactory can build

    Declaration

    Swift

    associatedtype ViewController
  • Context to be passed into UIViewController

    Declaration

    Swift

    associatedtype Context

Methods to implement

  • build(with:integrating:) Default implementation

    Builds a UIViewController that will be integrated into the stack

    Parameters:

    • context: A Context instance provided to the Router.
    • viewControllers: UIViewController instances to be integrated into the container as children view controllers

      Throws

      The RoutingError if the build does not succeed.

    Default Implementation

    Default implementation of the ContainerFactory‘s build method

    Declaration

    Swift

    func build(with context: Context, integrating viewControllers: [UIViewController]) throws -> ViewController

    Return Value

    The built UIViewController container instance.