在返回按钮中添加如下方法
UIViewController *rootVC = self.presentingViewController;
while (rootVC.presentingViewController) {
rootVC = rootVC.presentingViewController;
}
[rootVC dismissViewControllerAnimated:YES completion:nil];
UIViewController *rootVC = self.presentingViewController;
while (rootVC.presentingViewController) {
rootVC = rootVC.presentingViewController;
}
[rootVC dismissViewControllerAnimated:YES completion:nil];
本文标题:iOS 模态跳转多级页面后返回根视图
本文链接:https://www.haomeiwen.com/subject/xheymxtx.html
网友评论