2012-02-09 124 views

回答

2

这将图像保存到画廊

UIImageWriteToSavedPhotosAlbum(yourImage, self, @selector(image:didFinishSavingWithError:contextInfo:), nil); 

- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void*)contextInfo 
{ 
    if (error != NULL) 
    { 
     // handle error 
    } 
    else 
    { 
     // handle ok status 
    } 
} 

更多信息 - 开发者文档页面 - https://developer.apple.com/library/ios/#documentation/uikit/reference/UIKitFunctionReference/Reference/reference.html

如何下载和存储库全部在一个:

UIImageWriteToSavedPhotosAlbum([UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"your_image_address.com"]]], self, @selector(image:didFinishSavingWithError:contextInfo:), nil); 
+0

嗨...非常感谢你Danielbeard。 – Finder 2012-02-09 08:08:46

相关问题