保存图片到相机胶卷
作者:
米亚流年 | 来源:发表于
2018-07-04 14:08 被阅读0次- 导入头部
#import <Photos/Photos.h>
保存图片到相机胶卷
[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
//这个方法必须得嵌套在 [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{ 内
[PHAssetChangeRequest creationRequestForAssetFromImage:self.imageView.image];
} completionHandler:^(BOOL success, NSError * _Nullable error) {
if (success) {
[SVProgressHUD showSuccessWithStatus:@"保存成功"];
}else{
[SVProgressHUD showErrorWithStatus:@"保存失败"];
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[SVProgressHUD dismiss];
});
}];
本文标题:保存图片到相机胶卷
本文链接:https://www.haomeiwen.com/subject/nvyeuftx.html
网友评论