for (UIViewController *controller in self.navigationController.viewControllers) {
if ([controller isKindOfClass:[要返回的类名 class]]) {
[self.navigationController popToViewController:controller animated:YES];
}
}
---------------------------我是分割线-------------------------------
dissmiss 返回根部控制器
[self.presentingViewController.presentingViewController dismissViewControllerAnimated:NO completion:nil];