UIPageViewController 禁止翻页

UIPageViewController 禁止翻页代码如下:

for (UIGestureRecognizer *ges in self.pageViewController.view.gestureRecognizers) {
        if ([ges isKindOfClass:[UIPanGestureRecognizer class]]) {
            ges.enabled = NO;
            break;
        }
 }

你可能感兴趣的:(UIPageViewController 禁止翻页)