In my case parent UIViewController
contains UIPageViewController
which contains UINavigationController
which contains UIViewController
. I want to add a swipe gesture to the last view controller, but swipes are handled as if they belong to page view controller. I tried to do this both programmatically and via xib but with no result.
So as I understand I can't achieve my goal until UIPageViewController
handles its gestures. How to solve this issue?
A useful extension of
UIPageViewController
to enable and disable swipe.I solved it like this (Swift 4.1)
Thanks to @user2159978's answer.
I make it a little more understandable.
Implementing @lee's (@user2159978's) solution as an extension:
Usage: (in
UIPageViewController
)I translate answer of user2159978 to Swift