I have came across two ideas of saving images from app to photo library.
UIImageWriteToSavedPhotosAlbum(UIImage *image, id completionTarget, SEL completionSelector, void *contextInfo);
ALAssetsLibrary
I used the first one but it takes more time to save. Which is fast way to save images in library?
UIImageWriteToSavedPhotosAlbum
should be faster but anyway, you should and you have to do it on a background thread to not block the main thread and the UI.
Somehow like
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
UIImageWriteToSavedPhotosAlbum(img.image, nil, nil, nil);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With