ios - UIScrollView 在进入 UIPageViewController 时不滚动

标签 ios uigesturerecognizer uipageviewcontroller

我正在尝试使用 UIScrollView 作为 PageViewController 中的内容 View ,我已经按照 xcode 示例项目中的方式配置了页面 Controller 。

问题是内容有一个 ScrollView ,但它根本不滚动,我已经设置了 ScrollView 的内容大小和属性。我想它配置正确。

- (UIScrollView *)scrollView
{
    if (_scrollView == NULL) {
        _scrollView = [[UIScrollView alloc] init];
        _scrollView.backgroundColor      = [UIColor whiteColor];
        _scrollView.scrollEnabled        = TRUE;
        _scrollView.alwaysBounceVertical = TRUE;
    }
    return _scrollView;
}

然后,我将 View 的手势附加到 UIPageViewController 手势数组,这导致导航栏无法正常运行,因此我对以下内容进行了验证:

gestureRecognizerShouldBegin:

现在已经好了。

我不知道如何解决这个问题:S

最佳答案

试试这个

 [scrollmngmt setScrollEnabled:YES];
 [scrollmngmt setContentSize:CGSizeMake(320, 1200)];



 [self setScrollmngmt:nil];

关于ios - UIScrollView 在进入 UIPageViewController 时不滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13316195/

相关文章:

iOS - 在父级插入 AnotherVC 后如何在 NavigationController 堆栈中找到 ChildVC

ios - 在 Swift 中显示以前创建的 View Controller

ios - UIImage CompressionQuality 不是线性的

ios - View 边界外的 subview 上的手势识别器

ios - bringSubviewToFront(_ :) function breaks a UIPanGestureRecognizer

ios - UIScreenEdgePanGestureRecognizer 无法识别右边缘的手势

ios - UIPageControl 具有清晰的背景颜色,但仍在剪切重叠的 TextView

ios - 从枚举类型 'enum CGImageAlphaInfo' 隐式转换为不同的枚举类型 'CGBitmapinfo' (aka) 'enum CGBitmapInfo' ) ios 7

ios - 尝试理解 PageViewController

ios - 在 UIPageViewController 中嵌入 UIScrollView 并禁用 pageView 滑动?