To

public class To<ResultableType: Resultable>: DestinationAware

Define destination.

  • Assigns view controller to navigate to.

    • Example: Simple navigation to view controller instance.

      Navigate.present { $0
         .to(UIViewController())
      }
      

    Declaration

    Swift

    @discardableResult public func to<T>(_ viewController: T) -> Configuration<Result<T, Any>> where T: UIViewController

    Parameters

    viewController

    A view controller instance.

    Return Value

    Configuration object.

  • Assigns data receivable view controller to navigate to.

    • Example: Simple navigation to view controller instance.

      let viewController: DataReceivable = ViewController()
      
      Navigate.present { $0
         .to(viewController)
      }
      

    Declaration

    Swift

    @discardableResult public func to<T: DataReceivable>(_ viewController: T) -> Configuration<Result<T, T.DataType>>

    Parameters

    viewController

    A view controller instance conforming DataReceivable protocol.

    Return Value

    Configuration object.

  • Assigns view controller class to navigate to.

    • Example: Simple navigation to view controller class.

      Navigate.present { $0
         .to(UIViewController.self)
      }
      

    Declaration

    Swift

    @discardableResult public func to<T>(_ viewControllerClass: T.Type) -> Configuration<Result<T, Any>> where T: UIViewController

    Parameters

    viewControllerClass

    A view controller class.

    Return Value

    Configuration object.

  • Assigns data receivable view controller class to navigate to.

    • Example: Simple navigation to view controller instance.

      let viewControllerClass: DataReceivable.Type = ViewController.self
      
      Navigate.present { $0
         .to(viewControllerClass)
      }
      

    Declaration

    Swift

    @discardableResult public func to<T: DataReceivable>(_ viewControllerClass: T.Type) -> Configuration<Result<T, T.DataType>>

    Parameters

    viewControllerClass

    A view controller class conforming DataReceivable protocol.

    Return Value

    Configuration object.

  • Assigns block which can be used to resolve view controller asynchronously.

    Declaration

    Swift

    @discardableResult public func to<T>(_ block: @escaping (@escaping (T) -> Void) -> Void) -> Configuration<Result<T, Any>> where T: UIViewController

    Parameters

    block

    Pass view controller instance to this block when navigation is wanted.

    Return Value

    Configuration object.

  • Assigns block which can be used to resolve data receivable view controller asynchronously.

    Declaration

    Swift

    @discardableResult public func to<T: DataReceivable>(_ block: @escaping (@escaping (T) -> Void) -> Void) -> Configuration<Result<T, T.DataType>>

    Parameters

    block

    Pass view controller instance conforming DataReceivable protocol to this block when navigation is wanted.

    Return Value

    Configuration object.

  • Assigns block which can be used to resolve view controller asynchronously.

    Declaration

    Swift

    @discardableResult public func to<T>(_ block: @escaping (@escaping (T.Type) -> Void) -> Void) -> Configuration<Result<T, Any>> where T: UIViewController

    Parameters

    block

    Pass view controller class to this block when navigation is wanted.

    Return Value

    Configuration object

  • Assigns block which can be used to resolve data receivable view controller asynchronously.

    Declaration

    Swift

    @discardableResult public func to<T: DataReceivable>(_ block: @escaping (@escaping (T.Type) -> Void) -> Void) -> Configuration<Result<T, T.DataType>>

    Parameters

    block

    Pass view controller class conforming DataReceivable protocol to this block when navigation is wanted.

    Return Value

    Configuration object.

  • Assigns destination resolving its ViewController associated type to UIViewController class or subclass.

    Declaration

    Swift

    @discardableResult public func to<T: Destination>(_ destination: T) -> Configuration<Result<T.ViewControllerType, Any>>

    Parameters

    destination

    Destination object resolving it’s ViewController type to UIViewController class or subclass.

    Return Value

    Configuration object.

  • Assigns destination resolving its ViewController associated type to UIViewController class or subclass conforming DataReceivable protocol.

    Declaration

    Swift

    @discardableResult public func to<T: Destination>(_ destination: T) -> Configuration<Result<T.ViewControllerType, T.ViewControllerType.DataType>> where T.ViewControllerType: DataReceivable

    Parameters

    destination

    Destination object resolving it’s ViewController type to UIViewController class or subclass conforming DataReceivable protocol.

    Return Value

    Configuration object.

  • Assigns registered destination’s URL to navigate to.

    Declaration

    Swift

    @discardableResult public func to(_ url: URL) -> Configuration<Result<UIViewController, Any>>

    Parameters

    url

    URL instance.

    Return Value

    Configuration object.

  • Assign registered destination’s path to navigate to.

    Declaration

    Swift

    @discardableResult public func to(_ path: String) -> Configuration<Result<UIViewController, Any>>

    Parameters

    path

    String instance

    Return Value

    Configuration object.

  • Assign registered destination’s uri to navigate to.

    Declaration

    Swift

    @discardableResult public func to(_ matchable: Matchable) -> Configuration<Result<UIViewController, Any>>

    Parameters

    matchable

    Matchable object.

    Return Value

    Configuration object.