Structures

The following structures are available globally.

  • Type-erased wrapper for ViewControllerBuilder. It can be used to shorten ViewControllerBuilder signatures in cases, where generic type information is not needed by consumer of the Route. Another reason to do this if this generic information obstructs your usage of ViewControllerBuilders, for example in cases where you want to create a UITabBarController with array of builders, and each of them has completely different type. In this case, you can convert them to array of AnyBuilder objects.

    For example, when using navigation view builder, signature can become pretty long - NavigationSingleViewEmbeddingBuilder>. But generally, you don’t really care about resulting type as long as it’s type is ensured, and it is a UIViewController. In those cases, you could cast a builder like so: builder.asAnyBuilder which wraps builder in the AnyBuilder, which can be now used as return type that is much shorter.

    See more

    Declaration

    Swift

    public struct AnyBuilder : ViewControllerBuilder
  • Transition, that should not be performed and asserts if asked to do so. Can be used for routes that do not clearly define a transition, for example instances of ChainableRoute, which may have multiple chainable transitions embedded.

    See more

    Declaration

    Swift

    public struct NonTransition : ViewTransition