iOS 删除navigationController栈中得某一个viewController

http://blog.csdn.net/it_male/article/details/49931989

 

NSMutableArray *marr = [[NSMutableArray alloc]initWithArray:self.navigationController.viewControllers]; for (UIViewController *vc in marr) { if ([vc isKindOfClass:[theVCYouWantToRemove class]]) { [marr removeObject:vc]; break; } } self.navigationController.viewControllers = marr;

posted @ 2016-03-29 10:24  蜗牛d  阅读(626)  评论(0)    收藏  举报