Extras
-
See moreDestination
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.Declaration
Swift
public struct Destination<VC, C> where VC : UIViewController
-
AnyDestination
represents a genericDestination
that contains the screen configuration for any type ofUIViewController
and the context of any type.Declaration
Swift
public typealias AnyDestination = Destination<UIViewController, Any?>
-
See moreInlineStackIteratingFinder
. Might be useful for the configuration testing.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
See moreRoutingInterceptor
instance.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
See moreContextTask
instance.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
See morePostRoutingTask
instance.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 thanRouteComposer
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:
See moreUIKit
does not allow simultaneous changes inUIViewController
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.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 moreDeclaration
Swift
public struct SingleNavigationRouter<R> : Router where R : Router
extension SingleNavigationRouter: InterceptableRouter where R: InterceptableRouter
-
The
See moreDefaultRouter
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 thatDefaultRouter
will do.Declaration
Swift
public struct GlobalInterceptorRouter<R> : Router where R : Router
extension GlobalInterceptorRouter: InterceptableRouter where R: InterceptableRouter
-
See moreContextTask
that simplifies setting of the context to theUIViewController
that implementsContextAccepting
protocol.Declaration
Swift
public struct ContextSettingTask<VC> : ContextTask where VC : ContextAccepting
-
The protocol for a
See moreUIViewController
to make it compatible withContextSettingTask
.Declaration
Swift
public protocol ContextAccepting : UIViewController
-
The protocol for a
View
to make it compatible withContextSettingTask
.Due to some current
See moreswift
limitations protocolContextAccepting
can not be used directly.Declaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) public protocol ContextAcceptingView
-
See moreView
instance should conform to this protocol to be used withUIHostingControllerWithContextFactory
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
See moreContextChecking
to be used with this finder.Declaration
Swift
public struct ClassWithContextFinder<VC, C> : StackIteratingFinder where VC : UIViewController, VC : ContextChecking, C == VC.Context
-
See moreUIViewController
instance should conform to this protocol to be used withClassWithContextFinder
Declaration
Swift
public protocol ContextChecking
-
See moreDismissalMethodProvidingContextTask
allows to provide the way to dismiss theUIViewController
using a preset configuration. TheUIViewController
should conform toDismissible
protocol and callDismissible.dismissViewController(...)
method when it needs to be dismissed to trigger the dismissal process implemented inDismissalMethodProvidingContextTask.init(...)
constructor.Declaration
Swift
public struct DismissalMethodProvidingContextTask<VC, C> : ContextTask where VC : Dismissible
-
See moreUIViewController
should conform toDismissible
protocol to be used withDismissalMethodProvidingContextTask
.Declaration
Swift
public protocol Dismissible : UIViewController
-
See moreDismissibleWithRuntimeStorage
simplifiesDismissible
protocol conformance implementing requireddismissalBlock
using Objective C runtime.Declaration
Swift
public protocol DismissibleWithRuntimeStorage : Dismissible
-
Extension that wraps an action into
CATransaction
.When
DefaultRouter
builds a complicated chain of animated modifications in theUIViewController
s stack it might be necessary to wrap some actions into singleCATransaction
.Example: When
See moreUINavigationController
does pop, then push of theUIViewController
and then tries to do some to it or find it with aFinder
. ThenDefaultRouter
has to wait till the end of the animation.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 moreDeclaration
Swift
public extension DispatchQueue