HasRoutes
public protocol HasRoutes : AnyObject
Protocol to indicate your Coordinator has Routes. Future implementation will try and base on this to provide ways of managing routing easier
-
Associatedtype RouteType
This will be deduced from setting the property activeRoute
Declaration
Swift
associatedtype RouteType -
The currently active route on this class
Declaration
Swift
var activeRoute: RouteType { get set } -
This method tries to change the route state to the desired parameter. If successful, the property activeRoute will reflect the passed parameter.
If you override this method, you can check if the user has access to that specific route before changing the activeRoute and presenting a new Coordinator.
Declaration
Swift
func goTo(_ route: RouteType)Parameters
routeThe desired route
View on GitHub
Install in Dash
HasRoutes Protocol Reference