我添加了一个 UIPageViewController
在我的新游戏中获取说明,我想关闭 UIPageViewController
在用户按下最后一个 UIViewController
上的“GOT IT”按钮后连接到 UIPageViewController
到目前为止我已经试过了:
[self.pageVC dismissViewControllerAnimated:YES completion:nil];
而且它不会删除 UIPageViewController
, 为什么呢?
我怎样才能消除它?
为了显示/呈现 UIPageViewController
我这样做:
[self addChildViewController:self.pageVC];
[self.view addSubview:self.pageVC.view];
[self.pageVC didMoveToParentViewController:self];
最佳答案
请尝试与您描述的相反的调用:
[self.pageVC.view removeFromSuperview];
[self.pageVC removeFromParentViewController];
关于ios - 如何关闭 UIPageViewController?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24849345/