views:

3029

answers:

1

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?

+6  A: 

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.

August
So do you believe UIScrollview page control is more efficient than making transitions occur between multiple UIImageView's?
Kevin Elliott
Not necessarily. But for a beginner, it's a much better start.
August
I used UIScrollView and paging to do this, with no performance problems. Obviously I only put three images in the scrollview at any one time.
Airsource Ltd