Routable
public protocol Routable
Type, that is capable of performing route from current screen to another one.
One example of such type is Route
-
Type, responsible for building a view, that is needed for routing.
Declaration
Swift
associatedtype Builder : ViewControllerBuilder -
Type, responsible for performing a transition.
Declaration
Swift
associatedtype Transition : ViewTransition -
Instance of
ViewBuilder.Declaration
Swift
var builder: Builder { get } -
Instance of
ViewTransition.Declaration
Swift
var transition: Transition { get } -
Performs route using provided context.
Declaration
Swift
func perform(withViewFinder: ViewFinder, context: Builder.Context, completion: ((Bool) -> Void)?)Parameters
withViewFinderobject, that can be used to find currently visible view in view hierarchy
contextobject, that can be used for building a new route destination view.
completionclosure to be called, once routing is completed.
-
chained(with:Extension methodcontext: ) Chains current route with the next one.
Declaration
Swift
public func chained<T>(with chainedRoute: T, context: T.Builder.Context) -> ChainableRoute<Self, T> where T : RoutableParameters
chainedRouteRoute to be performed after current one.
contextArgument, used to build view for next route.
Return Value
ChainedRoute with current Route set as
HeadRoute, andchainedRouteset astailRoute. -
chained(with:Extension method) Chains current route with the next one.
Declaration
Swift
public func chained<T: Routable>(with chainedRoute: T) -> ChainableRoute<Self, T> where T.Builder.Context == VoidParameters
chainedRouteRoute to be performed after current one.
Return Value
ChainedRoute with current Route set as
HeadRoute, andchainedRouteset astailRoute.
View on GitHub
Install in Dash
Routable Protocol Reference