我如何在 tableView4 的 tableViewController 中同时关闭 tableView4 和 tableView3?
rootView(tableView1, tabView的一个tab, 嵌入navigationController)-->pushView1(tableView2)-->pushView2(tableView3)-->ModalView1(tableView4, 嵌入navigationController);
在您的模态视图上调用dismissViewControllerAnimated:completion:然后在您想要的视图上调用popViewControllerAnimated:。
UINavigationController *myNavController = [myViewController navigationController];
[myViewController dismissViewControllerAnimated:YES completion:^{
[myNavController popToViewController:[myNavController.viewControllers objectAtIndex:1] animated:YES];
}];
尝试这个:
UINavigationController *myNavController = [myViewController navigationController];
[myNavController popToViewController:[myNavController.viewControllers objectAtIndex:1];
[myViewController dismissViewControllerAnimated:YES completion:nil];