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
使用这个
UIViewController
的UINavigationController
进行页面跳转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
完成后异步回调