我有一个viewController
继承自UIPageViewController
( @interface PageScrollViewController : UIPageViewController
) 现在我想知道如何启用和禁用滚动UIPageViewController
?当使用 aUIScrollView
你会做setScrollEnabled:NO
并且 self.view.userInteractionEnabled = NO;
不是一个选项,因为这会阻止整个UIView
而不是仅仅滚动。
编辑
这是在PageScrollViewController : UIPageViewController
课堂上:
if ([[notification name] isEqualToString:@"NotificationDisable"]){
NSLog (@"Successfully received the disable notification!");
for (UIGestureRecognizer *recognizer in self.gestureRecognizers) {
recognizer.enabled = NO;
}
}