简体   繁体   中英

How do you implement swipe-able image stacks like the Photo app using the iPhone SDK?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM