I want to block the tap gesture (perfectly just the left border one, but both will be also fine, I will just add button for it) which is responded for changing pages in UIPageViewController.
I already tried this solution in 'viewDidLoad' method:
for recognizer in gestureRecognizers {
if recognizer is UITapGestureRecognizer {
recognizer.isEnabled = false
}
}
But it worked only for the case when TransitionStyle is set for Page Curl, in my case I need to use Scroll TransitionStyle.
Ps. I also found a comment in UIPageViewController implementation that gestureRecognizers are populated only if transition style is UIPageViewControllerTransitionStylePageCurl so there will be needed some bigger "hack", hope you can help me with it.
Pps. Yes I found this - UIPageViewController returns no Gesture Recognizers in iOS 6 . solution but it's pretty old and in objC and I would be glad to use Swift here.
Ppps. Setting dataSource on nil won't work - I need swipe gesture.