跳转到指定页面popToViewController用法
有人问popToViewController的用法 就写了下了 希望能帮到有需要的人
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2]
animated:YES];
或
for (UIViewController *temp inself.navigationController.viewControllers) {
if ([temp isKindOfClass:[你要跳转到的Controller class]]) {
[self.navigationControllerpopToViewController:temp animated:YES];
}
}
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2]
animated:YES];
或
for (UIViewController *temp inself.navigationController.viewControllers) {
if ([temp isKindOfClass:[你要跳转到的Controller class]]) {
[self.navigationControllerpopToViewController:temp animated:YES];
}
}