Browsed by
Tag: popToViewController

UINavigationController的popToViewController用法

UINavigationController的popToViewController用法

UINavigationController popToViewController可以指定UINavigationController跳转到某一个指定UIViewController控制器

[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2] animated:YES];

for (UIViewController *controller inself.navigationController.viewControllers) {
if ([controller isKindOfClass:[你要跳转到的Controller class]]) {
[self.navigationControllerpopToViewController:controller animated:YES];
}
}