3种跳转方式
a->b->c-> 实现c->a
1.通过修改导航栈来跳转 先修改栈再pop
[array removeObjectAtIndex:(array.count - 2)];
[self.navigationController setViewControllers:array animated:YES];
[self.navigationController popViewControllerAnimated:YES];
2.通过popToView来跳转 根据索引
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:array.count - 3] animated:YES];
3.通过popToView来跳转 找对应类
for (UIViewController *controller in self.navigationController.viewControllers) {
if ([controller isKindOfClass:[你要跳转到的Controller class]]) {
[self.navigationController popToViewController:controller animated:YES];
}
}