pop返回指定页面
2017-07-12 本文已影响0人
贝勒黑福晋
不废话, 直接上代码!!!!!
第一种:
let viewController = self.navigationController?.viewControllers[2]
self.navigationController?.popToViewController(viewController!, animated: true)
第二种:
let nsVC = NSActiveViewController()
for vc : UIViewController in (self.navigationController?.viewControllers)! {
if vc.isKindOfClass(nsVC.classForCoder) {
LTLog("返回女神controller")
self.navigationController?.popToViewController(vc, animated: true)
}
}