DefaultWireframe
open class DefaultWireframe : Wireframe, HasControllerContainer
                Undocumented
- 
                  
                  
Undocumented
Declaration
Swift
public let controllerContainer: ControllerContainer 
- 
                  
init(router:composedOptionProvider:routingHandlerContainer:composedControllerProvider:composedPresenterProvider:composedRoutingPresenter:routingDelegate:composedRoutingObserver:routeResultHandler:topControllerResolver:controllerDismisser:controllerContainer:)Undocumented
Declaration
Swift
public init( router : Router = DefaultRouter(), composedOptionProvider: ComposedRoutingOptionProvider = DefaultComposedRoutingOptionProvider(), routingHandlerContainer: RoutingHandlerContainer = DefaultRoutingHandlerContainer(), composedControllerProvider: ComposedControllerProvider = DefaultComposedControllerProvider(), composedPresenterProvider: ComposedPresenterProvider = DefaultComposedPresenterProvider(), composedRoutingPresenter: ComposedRoutingPresenter = DefaultComposedRoutingPresenter(), routingDelegate: RoutingDelegate = DefaultRoutingDelegate(), composedRoutingObserver: ComposedRoutingObserver = DefaultComposedRoutingObserver(), routeResultHandler: RouteResultHandler = DefaultRouteResultHandler(), topControllerResolver: ComposedTopControllerResolver = DefaultComposedTopControllerResolver(), controllerDismisser: ComposedControllerDimisser = DefaultComposedControllerDismisser(), controllerContainer: ControllerContainer = DefaultControllerContainer() ) 
- 
                  
                  
Declaration
Swift
open var topViewController: UIViewController? { get } - 
                  
                  
Declaration
Swift
open func dismissTopViewController(animated:Bool,completion: @escaping ()->Void) 
- 
                  
                  
Check if a route pattern matching this url was added to the wireframe. Be careful, if you don’t route to a handler (but to a controller), it’s possible that no ControllerProvider or RoutingOptionProvider for this controller exists.
Declaration
Swift
open func canRoute(url: URL, parameters: [String : Any], option: RoutingOption?) throws -> BoolParameters
urlthe url to check for resolution
parametersthe parameters (data) given to the controller
Return Value
Can the wireframe find a route for the given url
 - 
                  
                  
Route to a new route presenting a view controller
Throws
throws an error when no controller and/or option provider can be found.Declaration
Swift
open func route(url: URL, parameters: [String : Any] = [:], option: RoutingOption? = nil, completion: @escaping () -> Void = {}) throwsParameters
urlthe route of the view controller to be presented
optionhow should your view controller be presented (default is nil)
parametersa dictionary of parameters (data) send to the presented view controller (default is empty dict)
completionfunction called when the view controller was presented (default is empty completion)
 - 
                  
                  
Return the view controller for a given url
Declaration
Swift
open func controller(url: URL, parameters: [String : Any]) throws -> UIViewController?Parameters
urlurl
parametersparameters
Return Value
nil if no controller was found, the found controller otherwise
 
- 
                  
                  
Register a route pattern for routing. You have to register a route pattern to allow the wireframe matching it. This is done automatically if you are using a ViewFeature from SwiftyVISPER as ControllerProvider.
Declaration
Swift
open func add(routePattern: String) throwsParameters
patternthe route pattern to register
 - 
                  
                  
Register a handler for a route pattern The handler will be called if a route matches your route pattern. (you dont’t have to add your pattern manually in this case)
Declaration
Swift
open func add(priority: Int, responsibleFor: @escaping (RouteResult) -> Bool, handler: @escaping RoutingHandler) throwsParameters
priorityThe priority for calling your handler, higher priorities are called first. (Defaults to 0)
responsibleFornil if this handler should be registered for every routing option, or a spec
handlerA handler called when a route matches your route pattern
 - 
                  
                  
Add an instance providing a controller for a route
Declaration
Swift
open func add(controllerProvider: ControllerProvider, priority: Int = 0)Parameters
controllerProviderinstance providing a controller
priorityThe priority for calling your provider, higher priorities are called first. (Defaults to 0)
 - 
                  
                  
Add an instance providing a presenter for a route
Declaration
Swift
open func add(presenterProvider: PresenterProvider, priority: Int = 0)Parameters
providerinstance providing a presenter
priorityThe priority for calling your provider, higher priorities are called first. (Defaults to 0)
 - 
                  
                  
Add an instance providing routing options for a route
Declaration
Swift
open func add(optionProvider: RoutingOptionProvider, priority: Int = 0)Parameters
optionProviderinstance providing routing options for a route
priorityThe priority for calling your provider, higher priorities are called first. (Defaults to 0)
 - 
                  
                  
Add an instance observing controllers before they are presented
Declaration
Swift
open func add(routingObserver: RoutingObserver, priority: Int = 0, routePattern: String? = nil)Parameters
routingObserverAn instance observing controllers before they are presented
priorityThe priority for calling your provider, higher priorities are called first. (Defaults to 0)
routePatternThe route pattern to call this observer, the observer is called for every route if this pattern is nil
 - 
                  
                  
Add an instance responsible for presenting view controllers. It will be triggert after the wireframe resolves a route
Declaration
Swift
open func add(routingPresenter: RoutingPresenter,priority: Int = 0)Parameters
routingPresenterAn instance responsible for presenting view controllers
priorityThe priority for calling your provider, higher priorities are called first. (Defaults to 0)
 - 
                  
                  
Add a instance responsible for finding the top view controller on an other vc
Declaration
Swift
open func add(topControllerResolver: TopControllerResolver, priority: Int)Parameters
topControllerResolverinstance responsible for finding the top view controller on an other vc
priorityThe priority for calling your provider, higher priorities are called first. (Defaults to 0)
 - 
                  
                  
Add an instance responsible for dismissing controllers
Declaration
Swift
open func add(controllerDimisser: ControllerDismisser, priority: Int)Parameters
controllerDimisseran instance responsible for dismissing controllers
priorityThe priority for calling your dismisser, higher priorities are called first. (Defaults to 0)
 - 
                  
                  
Add a controller that can be used to navigate in your app. Typically this will be a UINavigationController, but it could also be a UITabbarController if you have a routing presenter that can handle it. Be careful you can add more than one viewControllers if your RoutingPresenters can handle different controller types or when the active ‘rootController’ changes. The last added controller will be used first. The controller will not be retained by the application (it is weakly stored), you need to store a link to them elsewhere (if you don’t want them to be removed from memory).
Declaration
Swift
open func navigateOn(_ controller: UIViewController)Parameters
controllera controller that can be used to navigte in your app
 - 
                  
                  
return the first navigatableController that matches in a block
Declaration
Swift
open func controllerToNavigate(matches: (UIViewController?) -> Bool) -> UIViewController? - 
                  
                  
delegate removement of a controller to navigate
Declaration
Swift
open func remove(controller: UIViewController) 
View on GitHub
        DefaultWireframe Class Reference