循环遍历
1 - (void)backHome:(UIButton *)button 2 { 3 self.navigationController.navigationBarHidden = NO; 4 CaseViewController *caseView = [[CaseViewController alloc] init]; 5 for (UIViewController *vc in self.navigationController.viewControllers) { 6 7 if ([vc isKindOfClass:[caseView class]]) { 8 9 [self.navigationController popToViewController:vc animated:YES]; 10 } 11 12 } 13 14 15 }