UINavigationController popToViewController用法

时间:2022-09-27 09:50:07

popToViewController用法 


[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];
    }
}