Matchable

public protocol Matchable

Used in route matching.

  • uri

    Route string.

    Declaration

    Swift

    var uri: String
  • viewController() Extension method

    Resolves view controller synchronously.

    Throws

    Throws error if view controller couldn’t be resolved.

    Declaration

    Swift

    public func viewController() throws -> UIViewController

    Return Value

    Destination’s view controller instance.

  • viewController(_:failure:) Extension method

    Resolves view controller.

    Declaration

    Swift

    public func viewController<T: UIViewController>(_ viewControllerBlock: @escaping (T) -> Void, failure: ((Error) -> Void)? = nil)

    Parameters

    viewControllerBlock

    Block returning UIViewController instance.

    failure

    Block returning Error instance.

  • present(completion:) Extension method

    Presents view controller after routing to self.

    Declaration

    Swift

    public func present(completion: (() -> Void)? = nil)

    Parameters

    completion

    Completion block.

  • present(_:) Extension method

    Presents view controller after routing to self.

    Declaration

    Swift

    public func present(_ block: @escaping (Configuration<Result<UIViewController, Any>>) -> Void)

    Parameters

    block

    Navigation configuration block.

  • push(_:) Extension method

    Pushes view controller after routing to self.

    Declaration

    Swift

    public func push(_ block: @escaping (Configuration<Result<UIViewController, Any>>) -> Void)

    Parameters

    block

    Navigation configuration block.