UIViewController

  • Returns the current application’s top most view controller.

    Declaration

    Swift

    public static func currentViewController(in window: UIWindow?) -> UIViewController?
  • Resolves view controller from string path.

    Declaration

    Swift

    public static func resolve<T: UIViewController>(_ path: String, _ viewControllerBlock: @escaping (T) -> Void, failure: ((Error) -> Void)?)

    Parameters

    path

    Path to resolve.

    viewControllerBlock

    Block returning UIViewController instance.

    failure

    Block returning Error instance.

  • Resolves view controller from URL.

    Declaration

    Swift

    public static func resolve<T: UIViewController>(_ url: URL, _ viewControllerBlock: @escaping (T) -> Void, failure: ((Error) -> Void)?)

    Parameters

    url

    URL to resolve.

    viewControllerBlock

    Block returning UIViewController instance.

    failure

    Block returning Error instance.

  • Resolves view controller from Matchable object.

    Declaration

    Swift

    public static func resolve<T: UIViewController>(_ matchable: Matchable, _ viewControllerBlock: @escaping (T) -> Void, failure: ((Error) -> Void)?)

    Parameters

    matchable

    Object conforming Matchable protocol.

    viewControllerBlock

    Block returning UIViewController instance.

    failure

    Block returning Error instance.

  • Resolves view controller from Destination object.

    Declaration

    Swift

    public static func resolve<T: Destination>(_ destination: T, _ viewControllerBlock: @escaping (T.ViewControllerType) -> Void)

    Parameters

    destination

    Object conforming Destination protocol.

    viewControllerBlock

    Block returning UIViewController instance.

  • Presents view controller from this view controller.

    Declaration

    Swift

    @discardableResult public func present(_ block: (To<Result<UIViewController, Any>>) -> Void) -> Self

    Parameters

    block

    Configuration block.

    Return Value

    This instance.

  • Pushes view controller from this view controller.

    Declaration

    Swift

    @discardableResult public func push(_ block: (To<Result<UIViewController, Any>>) -> Void) -> Self

    Parameters

    block

    Configuration block.

    Return Value

    This instance.