简体   繁体   中英

Save UIImage to Photo Library Instead of Camera Roll

I know how to save an image using standard API calls to the camera roll. I also know that devices without a camera get saved to the Photo Library.

For devices with a camera, how do I save a UIImage to the Photo Library INSTEAD of the camera roll?

您应该尝试通过IOS SDK提供此方法,

UIImageWriteToSavedPhotosAlbum(myImage, nil, nil, nil );

我知道如何做到这一点的唯一方法是使用UIImageWriteToSavedPhotosAlbum,快速路由是将nil传递给除UIImage参数之外的所有内容。

UIImageWriteToSavedPhotosAlbum(UIImage *image, id completionTarget, SEL completionSelector, void *contextInfo);

The photo library is just a placeholder that shows all the pics on your phone, including the camera roll. So, if you deleted a pic from the camera, it would be gone on the photo library. The one in the photo library is not a duplicate; it's more like a shortcut. Makes perfect sense. It's like a "favorites" folder. It sources it's info from the main folder.

This is what you find. the link shows how to store the images in iPhone Gallery. Check out the link: http://sugartin.info/2012/01/10/permanently-download-image-and-fetch-locally-images/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM