[英]How to create UIScrollView with different page sizes (page snapping, bounce)
I'm trying to create custom vertical UIScrollView which could handle multiple pages with different page heights. 我正在尝试创建自定义垂直UIScrollView,它可以处理具有不同页面高度的多个页面。
Assumptions: 假设:
I've tried many approaches to achieve this, but I've stumbled upon many UIScrollView quirks, which make it hard. 我已经尝试了很多方法来实现这一点,但我偶然发现了许多UIScrollView怪癖,这让它变得困难。
Problems: 问题:
Bonus 奖金
I have also tried putting UIScrollView inside UIScrollView as a page, but this approach was also pain in the neck. 我也尝试将UIScrollView放在UIScrollView中作为一个页面,但这种方法也是痛苦的。 For example when I was at the bottom of inside scroll, then i scrolled down a bit, put my finger away and quickly grabbed again and scrolled upwards, the outer scroll received touch, which messed up inside scroll presentation.
例如,当我在内部滚动的底部时,然后我向下滚动了一下,将我的手指放开并再次快速抓住并向上滚动,外部滚动接收到触摸,这在滚动演示内部搞砸了。
Does somebody have any idea how to do this? 有人知道怎么做吗? Any tips will be helpful as I'm completely stuck...
任何提示都会有所帮助,因为我完全陷入困境......
Try this. 试试这个。 Might help.
可能有帮助。 Based on the Circa news app.
基于Circa新闻应用程序。
https://www.cocoacontrols.com/controls/rscircapagecontrol https://www.cocoacontrols.com/controls/rscircapagecontrol
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.