开发者

Using the iphone camera

开发者 https://www.devze.com 2023-01-11 18:24 出处:网络
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.

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消