I\'m starting to develop a simple application for iOS, and this application is a simple gallery of some photo (taken from a website). The first problem I encountered is how
In case that you want to use third party classes, the next tutorials can be mixed, they worked for me.
Here's a good grid view:
custom image picker like uiimagepicker
And if you want to load them asynchronously, use this: image lazy loading
Both tutorials are very well described and have source code.
Um, since ios6 came out, the right way to do this is with Collection Views:
Apple Docs on CollectionViews
Also, see the two WWDC 2012 sessions on them:
Introduction to Collection Views
Advanced Collection Views
Sadly, Apple did not include a simple gallery or coverflow layout, but it's pretty easy to make one.
Here is a very good library called FGallery for iOS
-Supports auto-rotation
-thumbnail View
-zoom
-delete
If you don't want to use a third party library, you should do this in UITableView rows. Because of the way UITableView caches cells, it's relatively lightweight in memory. Certainly more so than a possibly very large UIView inside a UIScrollView. I've done it both ways, and I was much happier with the UITableView.
That said, next time I need to do this? I plan to use AQGridView.
You should check out AQGridView which does exactly what you are trying to achieve. Even if you want to write your own custom code, have a look at the AQGridView source as more than likely you will need to use a UIScrollView as a base.
I wrote a tutorial on building a media gallery using a UICollectionView. It populates from the user's photo library. I think it will work perfectly for what you are trying to do.
iPhone Programming Tutorial: Creating An Image Gallery Like Over – Part 1
Hope that helps. Cheers!