popToViewController用法

时间:2020-12-24 06:15:06
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:] animated:YES];

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