1.导航栏返回根视图
[self.navigationController popToRootViewControllerAnimated:YES];
2.导航栏返回特定视图
for (UIViewController *controller in self.navigationController.viewControllers) { if ([controller isKindOfClass:[要返回的类名 class]]) { [self.navigationController popToViewController:controller animated:YES]; } }
3.dissmiss 返回根视图
[self.presentingViewController.presentingViewController dismissViewControllerAnimated:NO completion:nil];
iOS返回根视图、特定视图的方法
最新推荐文章于 2021-01-27 00:57:37 发布