ControllerProvider

public protocol ControllerProvider

An instance providing a controller for an specific route pattern, routing option, parameter combination if it is responsible for it

  • Checks if a ControllerProvider can create a controller for a RouteResult, RoutingOption combination

    Declaration

    Swift

    func isResponsible(routeResult: RouteResult) -> Bool

    Parameters

    routeResult

    The route result for which a controller is searched

    routingOption

    The routing option which describes how the created controller will be presented

    Return Value

    true if it can create a controller, false otherwise

  • The provider return a view controller if he is responsible for

    Declaration

    Swift

    func makeController(routeResult: RouteResult) throws -> UIViewController

    Parameters

    routeResult

    The route result for which a controller is searched

    routingOption

    The routing option which describes how the created controller will be presented

    Return Value

    a view controller