iOS 让导航控制器pop回指定的控制器

NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:[self.navigationController viewControllers]];
for (UIViewController *myViewController in viewControllers) {
    if ([myViewController isKindOfClass:[RequiredViewController class]]) {
        [self.navigationController popToViewController: myViewController animated:YES];
    }
}

O(∩_∩)O~

你可能感兴趣的:(iOS 让导航控制器pop回指定的控制器)