我有一个应用程序,我在我的应用程序中使用pageviewcontroller。我的pageviewcontroller是scroll类型。我的问题是当我的pagviewcontroller是滚动类型时如何禁用手势识别器。
这可以卷曲,但不能滚动。当类型为curl时,我的gesturerecognizer数组返回0。
答案 0 :(得分:0)
不可能
来自UIPageViewController.h
// An array of UIGestureRecognizers pre-configured to handle user interaction. Initially attached to a view in the UIPageViewController's hierarchy, they can be placed on an arbitrary view to change the region in which the page view controller will respond to user gestures.
// Only populated if transition style is 'UIPageViewControllerTransitionStylePageCurl'.
@property(nonatomic, readonly) NSArray *gestureRecognizers;
注意仅当过渡样式为'UIPageViewControllerTransitionStylePageCurl'时才填充。
这里有一个解决方法 UIPageViewController returns no Gesture Recognizers in iOS 6