I see that I can remove all of the UIPageViewController gestures, but what if I only want to remove the tap gesture on the edges? And keep the swipe gesture? Is this possible?
Thanks
Try looping through pageViewController.gestureRecognizers
, disabling any that are tap recognizers.
Objective-C:
for (UIGestureRecognizer *recognizer in pageViewController.gestureRecognizers) {
if ([recognizer isKindOfClass:[UITapGestureRecognizer class]]) {
recognizer.enabled = NO;
}
}
Swift:
for recognizer in pageViewController.gestureRecognizers {
if recognizer is UITapGestureRecognizer {
recognizer.isEnabled = false
}
}