Help me go beyond "Hello World" in iPhone Development
July 14, 2009 5:26 PM   Subscribe

Can someone give me a quick outline on how I can create a simple photo gallery iPhone app? I'm a pretty decent web developer but this will be my first iPhone application.

A friend has a company website that has whole bunch of pictures of his products. A large percentage of the people who come to his site are there for the pictures, and aren't as interested in the products. He asked me to build a simple iPhone app. The app would show 50 or so thumbnails, and if the thumbnail is selected the fullsize picture is displayed.

All I want to do is duplicate the photo gallery app that comes with the phone, except this new one will display our pictures and not the user's pictures.

My plan (and feel free to tell me if there is a better way to do this) is to host the pictures and some sort of photo properties file (in XML) on Amazon's S3. When the user opens the app, it loads up the photo list and the app downloads the thumbnails and displays them. If the user selects a thumbnail, the app downloads and displays the fullsize image.

I've started going through the SDK documentation, but I'd be nice if someone here could give me a head start on this. I'm not looking for a someone to "hold my hand", just an outline on what components I should be looking at.

Let me give example using components I just made up :

1) Use CoreStartupProgAdd to load properties file from S3
2) Iterate through each element of the properties and create a ImageObj for each one.
3) Use UIImageDisplay to display the ImageObj's on the screen.
4) implement the UIOnClick interface to each UIImageDisplay to load the fullsize image when the user selects blah blah blah

If I can get an outline, I can research the SDK and figure the rest out.

posted by sideshow to Computers & Internet (5 answers total) 7 users marked this as a favorite
Best answer: This may only be tangentially helpful, but I know the PhoneGap open source framework has made life easier for a bunch of people, in that you can build pretty sophisticated apps with just Javascript and HTML, instead of Objective C. An alternative is Rhomobile.

Full disclosure: the guys who built PhoneGap are a client of mine.
posted by dbarefoot at 5:48 PM on July 14, 2009 [1 favorite]

Best answer: If you are going to require Internet connectivity to view the pictures, you are better off making a web application that is iPhone savvy. It'll be easier and you won't have to go through the app approval process plus paying to be a developer.
posted by chairface at 6:27 PM on July 14, 2009

Best answer: Seconding chairface. You say your background is in Web stuff. Objective-C, the language for iPhone apps, is nothing like Web development (html/css/javascript/php/etc.) Here's where to learn more about iPhone Web apps.

If you're hell-bent on writing a native app, retrieve the data, run it through a UITableView and write the UIImageView dynamically based on selection.

(But seriously, try a web app first.)
posted by ochenk at 6:45 PM on July 14, 2009

Best answer: Web apps would indeed be easier (whatever you think the app approval process is going to be like, take that and make it 10 times more painful), but if you're intent on making a native app, I think the developer of the Facebook app might have your back. His three20 framework has classes like TTPhotoViewController and TTImageView and I think the sample code for the "TTCatalog" project would be enough to get you going. You could probably just swap out some URLs and move some code around to change the navigation and you'd have a working prototype.

If you want a Table View instead of the grid view that the Photos app offers, there is an example using the Flickr API that they throw together at the end of Lecture 9 of iTunes U's Stanford iPhone Lecture series, a little after the 1 hour mark. Sample code and a link to the video podcast download are available here:
posted by ckolderup at 6:48 PM on July 14, 2009

Response by poster: I will talk to my friend and see if the website route works for him. Thanks for the help everyone.
posted by sideshow at 9:13 PM on July 14, 2009

« Older Paying up front?   |   Help me help my boss not get lost. Newer »
This thread is closed to new comments.