UIScrollView 限制可滚动区域
我有一个包含时间线的 UIScrollView 。有时我可能只想让用户看到视图的三分之一,因此我希望它只显示滚动视图的这一部分,但在视图的两端仍然有很好的“弹跳”效果以“预览”什么位于可滚动区域之外。
有什么办法可以做到这一点吗?
I have a UIScrollView which contains a timelime. Sometimes I may only want to let the user see say one third of the view and therefore I would like it to only show this part of the scrollview but still have this nice "bouncing" effect in both ends of the view to "preview" what is outside the scrollable area.
Is there any way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您应该指定 UIScrollView 的大小以结束您希望用户滚动到的位置,但保留 UIScrollView 的内部视图(子视图)的大小。
I think you should specify the size of the UIScrollView to end where you want your user to scroll to but leave the size of the inner view (subview) of the UIScrollView.