tags:

views:

40

answers:

1

What is the best way to use the iphone camera in your app?

I would want to allow the user to take an image, then either retake or save.

Where do the pics get saved to? Can I assign a name to a captured image?

Thanks

+2  A: 

You need to use UIImagePickerController. See Apple's documentation for information on how to use it: http://developer.apple.com/iphone/library/documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html

As for where the pictures get saved: They don't get saved anywhere automatically. You have to implement the UIImagePickerControllerDelegate method imagePickerController:didFinishPickingMediaWithInfo: and then store the UIImage to wherever you want, with whatever file name you want, using NSFileManager methods.

anshuchimala
I want to take images, not pick from existing. Doesnt the above just pick an image from already captured images?
alJaree
The name is somewhat misleading. `UIImagePickerController` is used to take pictures from the camera as well. See the `sourceType` property in the documentation.
anshuchimala