ios - 图片保存到相册
2018-05-25 12:52 菜鸟Alex 阅读(224) 评论(0) 编辑 收藏 举报- 在info.plist中添加权限声名否则崩溃
Privacy - Photo Library Additions Usage Description
- (void)loadImageFinished:(UIImage *)image
{
UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), (__bridge void *)self);
}
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
NSLog(@"image = %@, error = %@, contextInfo = %@", image, error, contextInfo);
}