如何使用iPhone SDK实现可移动图像堆栈,如Photo应用程序? [英] How do you implement swipe-able image stacks like the Photo app using the iPhone SDK?

查看:199
本文介绍了如何使用iPhone SDK实现可移动图像堆栈,如Photo应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想采用一堆图像(或者可能是一组URL来下载图像)并一次一个地全屏显示它们,使用用户滑动来平滑地动画显示堆栈中的下一个图像,使用iPhone SDK。 Apple的Photo.app似乎是这样做的。另外,如果还没有检索到图像,我想显示进度指示器。

I would like to take a stack of images (or potentially an array of URLs to download images) and display them in full screen, one at a time, using user swipes to smoothly animate the next image in the stack, using the iPhone SDK. Apple's Photo.app seems to do this. Additionally, if the image has not been retrieved yet, I'd like to display the progress indicator.

你能指点我的示例代码并解释这个技术将如何实现?

Can you point me to example code and explain how this technique would be implemented?

推荐答案

您需要使用UIScrollview的页面控制机制。 Apple有很多示例代码,包括一个奇怪的页面控制名称:

You need to use UIScrollview's page control mechanism. Apple has plenty of sample code, including one called, strangely enough, Page Control:

http://developer.apple.com/iphone/library/samplecode/PageControl/index.html

如果你想要除此之外的任何行为,你必须自己滚动它。

If you want any behavior beyond that, you'll have to roll it yourself.

这篇关于如何使用iPhone SDK实现可移动图像堆栈,如Photo应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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