是否可以在iOS中将应用程序本地存储在我们的应用程序中?

时间:2015-08-06 05:33:12

标签: ios local-storage file-manager

我有很多图像数据需要下载以备将来使用。有没有办法在我的应用程序之外存储我的应用程序的图像,以便我的应用程序的内存使用率会低?

1 个答案:

答案 0 :(得分:2)

是的,您可以将图像保存到图库:

UIImageWriteToSavedPhotosAlbum(UIImage *image, 
                               id completionTarget, 
                               SEL completionSelector, 
                               void *contextInfo);

完成功能应该是以下函数签名:

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

阅读documentation了解更多信息......