My iPhone app can now choose photos

Well, it took several days of hacking, but I finally figured out what was wrong with the iPhone app that I tried to code over the weekend, and it can display the photo picker now. The problem that I was having is that I was sending presentModalViewController: message to my UIViewController instance, as opposed to my UINavigationController instance. I mean, duh!

The actual, real, problem is that I'm still mighty confused by Cocoa, and only slightly confused by Objective-C. Now that I'm past this major hurdle, I hope to find myself in a state of less confusion soon. Of course, I still don't know how to handle the image, once the user has chosen it in the image picker...

Anyway, I have posted my sample code - if you download this code and build the project in Xcode 3.1, the resulting application should throw up the Photo Picker control, and then do nothing once you choose an image. Note that I am not the best Objective-C programmer (see above), so there are probably tons of mistakes and memory leaks in this sample code. But it does provide a complete reference of how to use the UIImagePickerController class, which Apple's documentation only gives hints about.

-Andy.