1、
for (UIViewController *controller in self.navigationController.viewControllers) {
if ([controller isKindOfClass:[GoodsDetailViewController class]]) {
GoodsDetailViewController *vc = (GoodsDetailViewController *)controller;
[self.navigationController popToViewController:vc animated:YES];
}
}
2、
UIViewController *controller = self.navigationController.viewControllers[1];
[self.navigationController popToViewController:controller animated:YES];
网友评论