I am developing one application. In that I want to save my pictures in camera roll. So how to save my pictures in camera roll through code?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The most basic way (and the only way if you’re targeting iOS before 4.0) is to use
UIImageWriteToSavedPhotosAlbum. This lets you specify a selector to be called on a target object when the save is complete.In 4.0, you can use ALAssetsLibrary’s
writeImageToSavedPhotosAlbum:orientation:completionBlock:to write the image; in this case, you provide a block to be called when the save is complete.In 4.1, you can also use ALAssetsLibrary’s
writeImageDataToSavedPhotosAlbum:metadata:completionBlock:orwriteImageToSavedPhotosAlbum:metadata:completionBlock:to write an image along with metadata (e.g. geotagging information). The former is also the only way to write an image from an NSData object without first loading it as a UIImage or CGImageRef.