How to programmatically save images in camera roll on iphone?

I am developing one application. In this I want to save my pictures in the camera. So, how to save my photos in frame using code?

+3
source share
2 answers

The easiest way (and the only way if you focus on iOS up to 4.0) is to use UIImageWriteToSavedPhotosAlbum. This allows you to specify the selector that will be called on the target when the save is complete.

In 4.0, you can use ALAssetsLibrary writeImageToSavedPhotosAlbum:orientation:completionBlock:to write an image; in this case, you provide a block to call when the save is complete.

4.1 ALAssetsLibrary writeImageDataToSavedPhotosAlbum:metadata:completionBlock: writeImageToSavedPhotosAlbum:metadata:completionBlock:, (, ). NSData UIImage CGImageRef.

+10

..UIImageWriteToSavedPhotos - ..

+1

All Articles