【发布时间】:2017-01-17 11:57:50
【问题描述】:
我在滚动视图中加载了一个 pdf,我想直接进入下一页而不让动画滚动。
CGRect scrollViewRect = CGRectInset(viewRect, -scrollViewOutset, 0.0f);
theScrollView = [[UIScrollView alloc] initWithFrame:scrollViewRect]; // All
theScrollView.autoresizesSubviews = NO;
theScrollView.contentMode = UIViewContentModeRedraw;
theScrollView.showsHorizontalScrollIndicator = NO;
theScrollView.showsVerticalScrollIndicator = NO;
theScrollView.scrollsToTop = NO;
theScrollView.delaysContentTouches = NO;
theScrollView.pagingEnabled = YES;
theScrollView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
theScrollView.backgroundColor = [UIColor clearColor];
theScrollView.delegate = self;
[self.view addSubview:theScrollView];
有可能吗?
【问题讨论】:
-
用户是否可以滚动或者您也想停止用户交互?
-
我只是想删除动画,用户仍然可以交互。他可以转到下一页,转到上一页,等等......
-
你检查我的答案了吗?是否按预期工作?
-
@Claudio 你不希望滚动视图在数据显示结束时反弹吗?
-
@DarshanKunjadiya 我希望这个人在滑动时直接显示下一页而不进行动画滚动。
标签: ios objective-c iphone xcode uiscrollview