项目中存在一个多条件判断跳转问题,在跳转之后页面完成操作跳回时需要跳到指定页面,可用两种方法实现,记录一下加深记忆
1.[self.navigationController popToViewController[self.navigationController.viewControllersobjectAtIndex:Index] animated:YES];
2.for (UIViewController *vc in self.navigationController.viewControllers) {
if ([vc isKindOfClass:[你要跳转到的vc class]]) {
[self.navigationController popToViewController:vc animated:YES];
}
}