1. 程式人生 > >iOS 保存圖片到本地

iOS 保存圖片到本地

err spa ont nbsp text tex idg 宋體 avi

- (void)loadImageFinished:(UIImage *)image

{

UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), (__bridge void *)self);

}

- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo

{

if (error == NULL) {

[EJProgressHUD showSuccess:@"保存成功!"];

}else

{

[EJProgressHUD showError:@"保存失敗"];

}

// NSLog(@"image = %@, error = %@, contextInfo = %@", image, error, contextInfo);

}

iOS 保存圖片到本地