Reputation: 578
I was using AlAsset library before, now for more info iam using Photos framework, I am able to get the photos and its info, but how to add to photo album back.
Upvotes: 3
Views: 3424
Reputation: 2224
try this
[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
[PHAssetChangeRequest creationRequestForAssetFromImage:[info valueForKey:UIImagePickerControllerOriginalImage]];
} completionHandler:^(BOOL success, NSError *error) {
if (success) {
NSLog(@"Success");
}
else {
NSLog(@"write error : %@",error);
}
}];
Check this answer, >> https://stackoverflow.com/a/31694088/2226263
Upvotes: 3
Reputation: 23359
You create and use PHAssetChangeRequest
objects within a photo library change block to create, delete, or modify PHAsset objects. See Documentation
Also check out this answer.
Upvotes: 1