GlobalInterceptorRouter

public struct GlobalInterceptorRouter<R> : Router where R : Router
extension GlobalInterceptorRouter: InterceptableRouter where R: InterceptableRouter

The DefaultRouter searches for the view controller as a starting point before it starts to run interceptors. Sometimes if interceptor can change the entire stack of view controllers it is handy to run a global interceptor any starting point is found. GlobalInterceptorRouter proxy allows to add such a global interceptor that will be executed before any work that DefaultRouter will do.

Methods

Available where R: InterceptableRouter

  • Declaration

    Swift

    public mutating func add<RI>(_ interceptor: RI) where RI : RoutingInterceptor, RI.Context == Any?
  • Declaration

    Swift

    public mutating func add<CT>(_ contextTask: CT) where CT : ContextTask, CT.Context == Any?, CT.ViewController == UIViewController
  • Declaration

    Swift

    public mutating func add<PT>(_ postTask: PT) where PT : PostRoutingTask, PT.Context == Any?