Reputation: 43
I have several UIViewControllers within a UIPageViewController. I can then swipe between these view controllers and everything works fine. However, most of these view controllers present a modal view controller using presentViewController:. When there is a view controller on screen that was presented in this way, I can no longer swipe between the other view controllers in the UIPageViewController.
For example, if one of the view controllers is eMail and another is Address Book, the eMail may do a presentViewController: to write a new eMail. The user would like to swipe to the address book view controller to look up an email address. The swipe gesture is currently disabled because of this modal view. Is there a way to enable swiping between the VC's of my page view controller when one of them is presenting a modal view?
Upvotes: 0
Views: 860
Reputation: 304
I would suggest you to not present it at all. Just add a view controller as a child view controller, also add its view as subview of current:
[self addChildViewController:composeMailController];
self.view addSubivew:composeMailController.view;
Adding it as a child will pass some events (like rotation) from parent to child.
Ofcouse you will have to animate appearance of the child view if this approach will work for you at all.
Upvotes: 0