在使用JTNavigationController
希望 pop回到最上层页面,而不需要在展示中间push的页面
方法如下:
var arr = self.jt_navigationController?.viewControllers
while arr!.count > 1{
arr?.removeLast()
}
let vc = MainStoryboard.instantiateViewController(withIdentifier: "OrderDetailController") as! OrderDetailController
vc.orderId = "1"
let scv = JTWrapViewController.init(viewController: vc)
arr?.append(scv!)
self.jt_navigationController?.setViewControllers(arr!, animated: true)