RouteRequest

public final class RouteRequest

路由请求包装,由此可以进行简便的页面跳转操作.

  • 异步获取路由结果页面

    Declaration

    Swift

    public func asyncGetViewController(_ completionHandler: @escaping RouteCompletionHandler<UIViewController>)

    Parameters

    completionHandler

    异步回调

  • 进行页面跳转

    Declaration

    Swift

    public func push(by root: UIViewController? = nil, animated: Bool = true, completionHandler: RouteCompletionHandler<UIViewController>? = nil)

    Parameters

    root

    使用这个UIViewControllerUINavigationController进行页面跳转

    animated

    是否开启动画

    completionHandler

    异步回调结果

  • 弹出页面

    Declaration

    Swift

    public func present(by root: UIViewController? = nil, animated: Bool = true, completionHandler: RouteCompletionHandler<UIViewController>? = nil)

    Parameters

    root

    使用这个UIViewController进行弹出

    animated

    是否开启动画

    completionHandler

    异步回调结果

  • 将页面包裹在UINavigationController中后弹出

    Declaration

    Swift

    public func presentWithNavigationController<N>(_ type: N.Type, by root: UIViewController? = nil, animated: Bool = true, completionHandler: RouteCompletionHandler<UIViewController>? = nil) where N : UINavigationController

    Parameters

    type

    UINavigationController的类型

    root

    使用这个UIViewController进行弹出

    animated

    是否开启动画

    completionHandler

    完成后异步回调