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.
Asked
Active
Viewed 3,416 times
2 Answers
3
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

Community
- 1
- 1

Karan Alangat
- 2,154
- 4
- 25
- 56
1
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.