如何将图像存储在缓存中? [英] How to store images in cache?
本文介绍了如何将图像存储在缓存中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在iPhone中,我要求将图像存储在缓存中.
in iphone i have requirement of store image in cache .
但是我如何将其存储在缓存中.
but how i can store this in cache.
我知道缓存的文件夹路径.这是我必须在该文件夹中写入图像以进行缓存的唯一方法吗?
I know the folder path of cache. is this only way i have to WRITE my image in that folder for cache?
我想知道其他方法.还是这是正确的方法? 请帮助我.
I want to know any other way. or is this correct way? Please help me.
推荐答案
使用此链接.
http://www.makebetterthings.com/iphone/image -caching-in-iphone-sdk/
使用此代码获取文件路径并添加特定文件:
edited:
get file path using this code and fatch the particular file :
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
NSString *libraryDirectory = [paths objectAtIndex:0];
这篇关于如何将图像存储在缓存中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文