I have to implement an Image Gallery for the iPhone iOS. Pictures are loaded from the web based on an XML document which contains the URLs of the pictures. My question is – what is the best approach for implementing an Image Gallery Overview of all pictures of a certain gallery? (where all pictures are presented to the user at once, like in a GridView. This question focuses on performance issues because one gallery can have more than 100 photos – each of them has a size of 100KB or more).
I already tried to implement a simple View which consists of multiple UIImageViews (rows and cols) where the images are loaded asynchronously. But the App crashes with low memory warnings, so I have to load the pictures on demand and not all at once.
What would be the best way to implement such a Gallery Overview? Using an UITableView with 3 pictures for each cell for instance? Or is it better to use a paged UIScrollView where the user is able to switch between pages where each page presents 12 pictures or so?
The main problem is the caching of the images. Would be glad for some hints.
You can cache images regardless on which solution you do, to cache the images you can either implement your own caching mechanism or use one already mad ( i opt for the second choice) i normally use ASIHTTPRequest, more specifically i use ASIDownloadCache check their documentation but its very easy to use