views:

3249

answers:

3

I have to create a photo gallery app in iPhone. It should function same as the Photos app which is shipped with iPhone. But it should show the images which I package with the app.

UIImagePickerController reads only the following source types. UIImagePickerControllerSourceTypePhotoLibrary, UIImagePickerControllerSourceTypeCamera, UIImagePickerControllerSourceTypeSavedPhotosAlbum

I was thinking of adding the images bundle to the resources group in Xcode and make UIImagePickerController to read them and display.

Looking at the class references I found UIImagePickerController reads only from the resources mentioned above. Which means it can only pick the images from camera roll OR saved photo gallery OR allow user to take a pic and use it.

Does anybody know how to make UIImagePickerController read from custom source type or images?

OR

How to create a photo gallery app in iPhone :-)

Thanks, AJ

+5  A: 

I don't believe it is possible to make the UIImagePicker pick images from your own source. You will have to write the picker yourself (which, performance aside, doesn't seem to hard... Just a couple of UIImageViews in a UIScrollView).

Jongsma
I second this, sadly Apple didn't make it avaliable for developers to put in their own datasource but its not a huge deal. There's lots of improvments that can be made to a UIImagePicker-esque interface if you write one yourself.
David Wong
Any suggestions or head start you can provide me. I have to create a photo gallery app like the Photos app shipped with apple. I will go through UIScrollView references. Anything else you would like me to suggest would be great head start for me!Thanks
AJ
A: 

i want to do the exact same thing, did you manage to do it ?

+2  A: 

Just today I started a open source UIImagePickerController clone, it is not perfect but it works quite ok. Feel free to fork http://github.com/jeena/JPImagePickerController

Jeena
But the questions is can you sub-class the UIImagePickerController and have your app approved by Apple?
AJ
But hey, thanks for sharing your git code!
AJ