DefaultRouter
public struct DefaultRouter : InterceptableRouter, MainThreadChecking
Default Router
implementation
-
ContainerAdapter
instance.Declaration
Swift
public let containerAdapterLocator: ContainerAdapterLocator
-
StackPresentationHandler
instanceDeclaration
Swift
public let stackPresentationHandler: StackPresentationHandler
-
Constructor
Parameters
- logger: A
Logger
instance to be used by theDefaultRouter
. - stackPresentationHandler: A
StackPresentationHandler
instance to be used by theDefaultRouter
. - containerAdapterLocator: A
ContainerAdapterLocator
instance to be used by theDefaultRouter
.
Declaration
Swift
public init(logger: Logger? = RouteComposerDefaults.shared.logger, stackPresentationHandler: StackPresentationHandler = DefaultStackPresentationHandler(), containerAdapterLocator: ContainerAdapterLocator = RouteComposerDefaults.shared.containerAdapterLocator)
- logger: A
-
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?
-
Declaration
Swift
public mutating func add<PT>(_ postTask: PT) where PT : PostRoutingTask, PT.Context == Any?
-
Declaration
Swift
public func navigate<Context>(to step: DestinationStep<some UIViewController, Context>, with context: Context, animated: Bool = true, completion: ((_: RoutingResult) -> Void)? = nil) throws