1 - (void)removeVC:(UIViewController *)urViewControllerClass 2 { 3 // NSArray* tempVCA = [self.navigationController viewControllers]; 4 NSMutableArray *tempVCA = [NSMutableArray arrayWithArray:[self.navigationController viewControllers]]; 5 6 for(UIViewController *tempVC in tempVCA) 7 { 8 if([tempVC isKindOfClass:[urViewControllerClass class]]) 9 { 10 // [tempVC removeFromParentViewController]; 11 [tempVCA removeObject:tempVC]; 12 [self.navigationController setViewControllers:tempVCA animated:YES]; 13 break; 14 } 15 } 16 }
时间: 2024-10-29 19:07:14