views:

252

answers:

1

I've been looking into creating a gallery mode in my application. The functionality will be identical to the built in Photos App.

Here's the flow: 1. You touch on a thumbnail and ... 2. a modal view displays a large detail version of the image 3. You have the ability to scroll horizontally through all the images in the gallery while in this modal view

I'm stuck on step 3.

How do I dynamically load hi res images into a scroll view? I understand I need to set the contentSize for the the scrollView but how do I do that when I've only selected and loaded one image? What delegate methods do I need to implement and what does the heavy lifting look like?

Thanks in advance!

A: 

Refer to the following example project from apple, it shows how to use a scroll view to scroll horizontally through some views, u shouod only need to change the conents of those views to contain ur images http://developer.apple.com/iphone/library/iPad/index.html#samplecode/PageControl/Introduction/Intro.html

Daniel
thanks for the link. Even that sample code doesn't have what I'm looking for. Looking at the source I see this comment:// A possible optimization would be to unload the views+controllers which are no longer visibleWhich is exactly what I'm looking to do.
Jeff
That shouldn't be that tough, u have the index of the curnt pages so ud want to unload the pages that are 2 or more index away from the page..
Daniel