Piictu如何实现垂直和水平滚动?
iOS应用程序“Piictu”的主视图是一个垂直滚动的相册列表。每个专辑的缩略图都内嵌显示并水平滚动。
如果您从任意点向下或向上滑动,即使手势的起点位于相册缩略图上,父视图也会垂直滚动。
您对如何完成此操作的最佳理解是什么?父视图上的垂直滑动手势识别器和相册子/子视图上的水平滑动手势识别器?
或者,这可能是一个 UIWebView 吗?
谢谢!
The main view of the iOS app "Piictu" is a vertical scrolling list of photo albums. The thumbnails of each album are displayed inline and scroll horizontally.
If you swipe down or up from any point the parent view scrolls vertically, even when the starting point of the gesture on an album thumbnail.
What's your best understanding of how this is done? A vertical swipe gesture recognizer on the parent view and a horizontal swipe gesture recognizer on the album child/sub views?
Or, is this perhaps a UIWebView?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它比这简单得多,或者至少可以做得更简单:只需嵌套滚动视图。外层覆盖整个屏幕,只允许垂直滚动。每个系列的缩略图都包含在另一个较小的滚动视图中,该视图仅允许水平滚动。我自己在一个由我承包开发的应用程序中使用了这种技术。
It's a lot simpler than that, or at least it can be done a lot simpler: just nest scroll views. The outer one covers the whole screen and only allowing vertical scrolling. Each series of thumbnails is contained in another, smaller scroll view which only allows horizontal scrolling. I've used this technique myself for an app I was contracted to develop.