ios 跨页返回,从navigationController 删除指定页面

 

 

 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 }

 

posted on 2016-06-30 17:30  codemaker313  阅读(548)  评论(0编辑  收藏  举报

导航