Core Entities
-
Base router protocol.
See moreDeclaration
Swift
public protocol Router
-
Routing
See moreError
representationDeclaration
Swift
public enum RoutingError : Error, CustomStringConvertible
-
The
Factory
protocol should be implemented by the instance that produces any types of the view controllers.NB
See moreContext
represents a payload that you need to pass to yourUIViewController
and something that distinguishes it from others. It is not a View Model or some kind of Presenter. It is the missing piece of information. If your view controller requires aproductID
to display its content, and theproductID
is aUUID
, then the type ofContext
is theUUID
. The internal logic belongs to the view controller.Context
answers the questions What to I need to present a ProductViewController and Am I already presenting a ProductViewController for this product.Declaration
Swift
public protocol Factory : AbstractFactory
-
The
ContainerFactory
protocol should be implemented by the instance that produces any types of the view controllers that can be considered as containers (eg:UINavigationController
,UITabBarController
, etc)The
See moreRouter
usesContainerAction.perform(...)
method of aContainerAction
and then populates a full stack of the view controllers that were built by the associated factories in one go. Example:Router
requires to populate N-view controllers intoUINavigationController
‘s stack.Declaration
Swift
public protocol ContainerFactory : AbstractFactory where Self.ViewController : ContainerViewController
-
Represents an action that has to be applied to the
UIViewController
after it has been built (eg: push to navigation stack, present modally, push to tab, etc)Declaration
Swift
public protocol Action : AbstractAction
-
Represents an action to be used by a
See moreContainerFactory
to build it’s children view controller stackDeclaration
Swift
public protocol ContainerAction : AbstractAction where Self.ViewController : ContainerViewController
-
The result of the navigation process
- success: The request to process the navigation resulted in a successful navigation to the destination.
- failure: The request to process the navigation was not successful.
Declaration
Swift
public enum RoutingResult
-
Default configuration for all the instances in
RouteComposer
.NB: If you are going to provide your own defaults, make sure that
See moreRouteComposerDefaults.configureWith(...)
is called before the instantiation of any otherRouteComposer
‘s instances.AppDelegate
is probably the best place for it.Declaration
Swift
public final class RouteComposerDefaults