NavigationDelayingInterceptor

public struct NavigationDelayingInterceptor<Context> : RoutingInterceptor

NavigationDelayingInterceptor delays the router from starting the navigation, while any view controllers in the stack are being presented or dismissed. In case your app has some other navigation instruments rather than RouteComposer or you have a situation when a few routers work simultaneously, add it to your router to avoid the router not being able to navigate to the destination because a view controller in the stack is being presented or dismissed.

NB: UIKit does not allow simultaneous changes in UIViewController stack. The .wait strategy does not guarantee 100% protection from all possible situations. The code must be written in a way that avoids such situations. The .wait strategy can be used only as a temporary solution.

Internal entities

  • The strategy to be used by NavigationDelayingInterceptor

    • wait: Wait while some UIViewController is being presented or dismissed.
    • abort: Abort tha navigation if some UIViewController is being presented or dismissed.
    See more

    Declaration

    Swift

    public enum Strategy

Properties

Methods