/**
找到指定 vc 返回到那个 vc
*/
DQMyActivityListTableViewController *homeVC = [[DQMyActivityListTableViewController alloc] init];
DQActivityDetailsViewController *detailsVC = [[DQActivityDetailsViewController alloc] init];
UIViewController *target = nil;
for (UIViewController *controller in self.navigationController.viewControllers) { //遍历
if ([controller isKindOfClass:[homeVC class]]) { //这里判断是否为你想要跳转的页面 我的活动
target = controller;
}
if ([controller isKindOfClass:[detailsVC class]]) { // 活动列表
target = controller;
}
}
if (target) {
[self.navigationController popToViewController:target animated:YES]; //跳转
}
网友评论