问题
I am working on app in which I'm using UIPageViewController. Now I want to disable page scrolling not Gestures. actually I want to draw signature in view that contain in UIPageViewController.For this I need to disable page scrolling. I've done Gesture disable but it is not what I want.
for (UIGestureRecognizer *recognizer in pageViewController.gestureRecognizers)
{
recognizer.enabled = YES;
}
And I want it with the help of Edit button that when I press page scrolling disable and enable with pressing again. Any body can tell me How will it be possible.
回答1:
if You need to disable scrolling in UIPageViewController - You can return nil in data source methods:
- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController
- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController
来源:https://stackoverflow.com/questions/27171786/disable-page-scrolling-in-uipageviewcontroller