Search code examples
iphoneopenfiledialog

Is there any standard fileopen dialog in iphone programming?


I want to create application, that will process images(mostly - photographs from mobile camera).

So i need at first to provide the way to open image file from phone memory. how can i do that? Sorry for such a stupid question, but i am newbie in iphone programming(yet:)).

P.S. I use xcode, cocoa


Solution

  • You can use UIImagePickerController to get a standard interface for selecting a photo from the user's library or camera roll. Depending on the configuration, it can also be used to capture a new image with the camera. Note however that you get a UIImage back, not a file, if you want to upload it somewhere, you will first have to create a file or NSData object from the image, using either UIImagePNGRepresentation() or UIImageJPEGRepresentation().