【发布时间】:2013-04-05 08:27:03
【问题描述】:
我有一个viewController,它继承自UIPageViewController (@interface PageScrollViewController : UIPageViewController) 现在我想知道如何启用和禁用UIPageViewController 的滚动?使用UIScrollView 时,您可以使用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;
}
}
【问题讨论】:
标签: iphone ios objective-c