I am working on an app like hiding photos and I want to move the images to my app so for that I have to import images from photo library and delete that image from library but I cant understand how to work with PHAssets
and where to implement.
I used the UIPickerview to pick the image and then delete it from library please anyone can help me for that
This the picker where I get image :
UIImage *chosenImage = info[UIImagePickerControllerEditedImage];
And this is for delete but what is asset :
[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
[PHAssetChangeRequest deleteAssets:formatWithOrientation];
} completionHandler:^(BOOL success, NSError *error) {
NSLog(@"Finished deleting asset. %@", (success ? @"Success." : error));
}];