I added a UIPageViewController
for instructions in my new game, and I want to dismiss the UIPageViewController
after the user pressed the "GOT IT" button on the last UIViewController
that connect to the UIPageViewController
I've tried this so far:
[self.pageVC dismissViewControllerAnimated:YES completion:nil];
And it doesn't remove the UIPageViewController
, Why that?
And how can I dismiss it?
In order to show/present the UIPageViewController
I do this:
[self addChildViewController:self.pageVC];
[self.view addSubview:self.pageVC.view];
[self.pageVC didMoveToParentViewController:self];
10x In advance!
Please try the opposite calls you have described:
[self.pageVC.view removeFromSuperview];
[self.pageVC removeFromParentViewController];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With