Protocols

The following protocols are available globally.

  • Type, that is capable of building a ViewController, given Context.

    See more

    Declaration

    Swift

    public protocol ViewControllerBuilder
  • Type, responsible for finding currently visible view in existing view hierarchy.

    See more

    Declaration

    Swift

    public protocol ViewFinder
  • Type that is responsible for providing root view in current view hierarchy.

    Note

    on iOS and tvOS, commonly, the root provider is UIWindow via UIApplication.shared.keyWindow, however there are scenarios where keyWindow might not be accessible, for example in iMesssage apps and application extensions. In those cases you can use root view controller that is accessible in those context, for example in iMessage extensions this could be MSMessagesAppViewController, or view controller presented on top of it. Also, your app might have several UIWindow objects working in the same time, for example when app is using AirPlay, or if UIWindows are used to present different interfaces modally. In those cases it’s recommended to have multiple Router objects with different RootViewProviders.
    See more

    Declaration

    Swift

    public protocol RootViewProvider
  • Type, that is capable of performing route from current screen to another one. One example of such type is Route type, that includes necessary builder to build next visible view, and transition object, that will perform a transition.

    See more

    Declaration

    Swift

    public protocol Routable
  • Type, that can be updated with newly received Context

    See more

    Declaration

    Swift

    public protocol ContextUpdatable
  • Object, that searches view hierarchy to find View, that can be updated with provided Context.

    See more

    Declaration

    Swift

    public protocol UpdatableViewFinder
  • Type, that is responsible for making a transition between views.

    See more

    Declaration

    Swift

    public protocol ViewTransition