如何像 iOS 照片应用一样实现缩放 * 和 * 分页 [英] How to implement zooming *and* paging like iOS Photos app

查看:35
本文介绍了如何像 iOS 照片应用一样实现缩放 * 和 * 分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Apple 的照片应用中,您可以在查看时在照片之间滑动,也可以放大和平移照片.当您到达放大照片的边缘时,您仍然可以滑动到下一张图像 - 需要什么样的滚动视图设置才能允许这样做?

In Apple's photo's app you can swipe between photos while viewing, and also zoom into and pan around a photo. When you get to the edge of a zoomed photo you can still swipe into the next image - what kind of scrollview setup is needed to allow this?

推荐答案

WWDC 2010 有一个很棒的视频 - https://developer.apple.com/videos/wwdc/2010/

There's an excellent video from WWDC 2010 - https://developer.apple.com/videos/wwdc/2010/

本次会议的标题是使用滚动视图设计应用程序".这正是您要问的问题的分步说明.

The session is titled "Designing Apps with Scroll Views". It's a step-by-step of exactly what you're asking.

根据 omz 的回应,分页滚动部分非常简单.但是 Apple 在如何创建和重用可缩放滚动视图方面做了一些更复杂的事情.你真的应该看看视频.

Per omz's response, the paging scroller part is pretty straight forward. But Apple does some more complex things with how the zoomable scroll views are created and reused. You really should check out the video.

这篇关于如何像 iOS 照片应用一样实现缩放 * 和 * 分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆