我有一个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;
}
}