//遍历导航控制器(栈)中的控制器 for (UIViewController *controller in self.navigationController.viewControllers) { // 找到相应的控制器 if ([controller isKindOfClass:[ThirdViewController class]]) { //跳转到该控制器 [self.navigationController popToViewController:controller animated:YES]; } }