Destination

public protocol Destination: AnyDestination, ParametersAware

Destination protocol describes wrapper for destination.

  • resolve(context:) Default implementation

    Resolves routing.

    Default Implementation

    Resolves routing.

    Declaration

    Swift

    static func resolve(context: Context<ViewControllerType>)

    Parameters

    context

    Context object.

  • viewController() Extension method

    Resolves view controller synchronously.

    Throws

    Throws error if view controller couldn’t be resolved.

    Declaration

    Swift

    public func viewController() throws -> ViewControllerType

    Return Value

    Destination’s view controller instance.

  • viewController(_:failure:) Extension method

    Resolves view controller asynchronously.

    Declaration

    Swift

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

    Parameters

    viewControllerBlock

    Block returning UIViewController instance.

    failure

    Block returning Error instance.

  • present(completion:) Extension method

    Presents view controller.

    Declaration

    Swift

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

    Parameters

    completion

    Completion block.

  • present(_:) Extension method

    Presents view controller.

    Declaration

    Swift

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

    Parameters

    block

    Configuration object.

  • push(_:) Extension method

    Pushes view controller.

    Declaration

    Swift

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

    Parameters

    block

    Configuration object.