pop 到指定控制器:
方法一:
for (UIViewController *controllerinself.navigationController.viewControllers) {
if ([controllerisKindOfClass:[GetMoneyVCclass]]) {
GetMoneyVC *revise =(GetMoneyVC *)controller;
[self.navigationControllerpopToViewController:reviseanimated:YES];
}
}
方法二:
rootViewcontroller是数组中的第0个元素;下一级就是第一个元素,一次类推
UIViewController *viewCtl =self.navigationController.viewControllers[1];
[self.navigationControllerpopToViewController:viewCtlanimated:YES];