Extras

  • Destination instance represents both final screen configuration and the data to provide. It is useful when there is a need to wrap both values into a single DTO value.

    See more

    Declaration

    Swift

    public struct Destination<VC, C> where VC : UIViewController
  • AnyDestination represents a generic Destination that contains the screen configuration for any type of UIViewController and the context of any type.

    Declaration

    Swift

    public typealias AnyDestination = Destination<UIViewController, Any?>
  • InlineFactory. Might be useful for the configuration testing.

    See more

    Declaration

    Swift

    public struct InlineFactory<VC, C> : Factory where VC : UIViewController
  • InlineStackIteratingFinder. Might be useful for the configuration testing.

    See more

    Declaration

    Swift

    public struct InlineStackIteratingFinder<VC, C> : StackIteratingFinder where VC : UIViewController
  • InlineInterceptor

    NB: It may be used for the purpose of configuration testing, but then replaced with a strongly typed RoutingInterceptor instance.

    See more

    Declaration

    Swift

    public struct InlineInterceptor<C> : RoutingInterceptor
  • InlineContextTask

    NB: It may be used for the purpose of configuration testing, but then replaced with a strongly typed ContextTask instance.

    See more

    Declaration

    Swift

    public struct InlineContextTask<VC, C> : ContextTask where VC : UIViewController
  • InlinePostTask is the inline context task.

    NB: It may be used for the purpose of configuration testing, but then replaced with a strongly typed PostRoutingTask instance.

    See more

    Declaration

    Swift

    public struct InlinePostTask<VC, C> : PostRoutingTask where VC : UIViewController
  • 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.

    See more

    Declaration

    Swift

    public struct NavigationDelayingInterceptor<Context> : RoutingInterceptor
  • The Router proxy guarantees that not more than one navigation will happen simultaneously.

    It is useful to avoid situations when the application can not control the amount of navigations (for example, a navigation triggered by the push notifications)

    See more

    Declaration

    Swift

    public struct SingleNavigationRouter<R> : Router where R : Router
    extension SingleNavigationRouter: 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.

    See more

    Declaration

    Swift

    public struct GlobalInterceptorRouter<R> : Router where R : Router
    extension GlobalInterceptorRouter: InterceptableRouter where R: InterceptableRouter
  • PresentingFinder returns the presenting UIViewController of the topmost one in current stack.

    See more

    Declaration

    Swift

    public struct PresentingFinder<C> : Finder
  • ContextTask that simplifies setting of the context to the UIViewController that implements ContextAccepting protocol.

    See more

    Declaration

    Swift

    public struct ContextSettingTask<VC> : ContextTask where VC : ContextAccepting
  • The protocol for a UIViewController to make it compatible with ContextSettingTask.

    See more

    Declaration

    Swift

    public protocol ContextAccepting : UIViewController
  • The protocol for a View to make it compatible with ContextSettingTask.

    Due to some current swift limitations protocol ContextAccepting can not be used directly.

    See more

    Declaration

    Swift

    @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
    public protocol ContextAcceptingView
  • View instance should conform to this protocol to be used with UIHostingControllerWithContextFactory

    See more

    Declaration

    Swift

    @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
    public protocol ContextInstantiatable : View
  • A default implementation of the view controllers finder, that searches for a view controller by its name and its Context instance.

    The view controller should conform to the ContextChecking to be used with this finder.

    See more

    Declaration

    Swift

    public struct ClassWithContextFinder<VC, C> : StackIteratingFinder where VC : UIViewController, VC : ContextChecking, C == VC.Context
  • UIViewController instance should conform to this protocol to be used with ClassWithContextFinder

    See more

    Declaration

    Swift

    public protocol ContextChecking
  • DismissalMethodProvidingContextTask allows to provide the way to dismiss the UIViewController using a preset configuration. The UIViewController should conform to Dismissible protocol and call Dismissible.dismissViewController(...) method when it needs to be dismissed to trigger the dismissal process implemented in DismissalMethodProvidingContextTask.init(...) constructor.

    See more

    Declaration

    Swift

    public struct DismissalMethodProvidingContextTask<VC, C> : ContextTask where VC : Dismissible
  • UIViewController should conform to Dismissible protocol to be used with DismissalMethodProvidingContextTask.

    See more

    Declaration

    Swift

    public protocol Dismissible : UIViewController

Helper methods where the DismissalTargetContext is Void

  • DismissibleWithRuntimeStorage simplifies Dismissible protocol conformance implementing required dismissalBlock using Objective C runtime.

    See more

    Declaration

    Swift

    public protocol DismissibleWithRuntimeStorage : Dismissible
  • Finder that helps to find the UINavigationController inside of the details of the UISplitController

    See more

    Declaration

    Swift

    public struct DetailsNavigationFinder<C> : Finder
  • Extension that wraps an action into CATransaction.

    When DefaultRouter builds a complicated chain of animated modifications in the UIViewControllers stack it might be necessary to wrap some actions into single CATransaction.

    Example: When UINavigationController does pop, then push of the UIViewController and then tries to do some to it or find it with a Finder. Then DefaultRouter has to wait till the end of the animation.

    See more

    Declaration

    Swift

    public extension CATransaction
  • Extension that wraps actions into DispatchQueue and delays it for the provided time interval.

    Can be used to test action implementation or the configuration issues.

    See more

    Declaration

    Swift

    public extension DispatchQueue