NSMutableArray<UIViewController *> *tmpArr = [NSMutableArray array];
for (UIViewController *vc in self.navigationController.viewControllers) {
[tmpArr addObject:vc];
}
for (UIViewController *vc in self.navigationController.viewControllers) {
if (vc == self) {
[tmpArr removeObject:vc];
}
}
self.navigationController.viewControllers = tmpArr;
网友评论