开发者

Three20 and TTTableImageItem

I m starting a new project and looking into three20 for the table views. I saw that TTTableImageItem offers part of the required functionality for free,to lazily load the images,but what i want to do is also save each photo to disk after the first load so the next time i will fetch them from there. In previous cases i was doing manualy the loading of the visible images at my model ,so i could also开发者_开发技巧 save them . Is there any way to achieve such a thing and keep the rest of the functionallity TTTableImageItem offers?


Yes TTCache will do this for you.

[[TTURLCache sharedCache] storeImage:image forURL:URL];


Yes your suggestion seems to be what im looking for,though one thing that i havent sorted out is how to get notified that the image has loaded so to store it on disk. I see the TTTableImageItemCell has a TTImageView which has a delegate property for the TTImageViewDelegate protocol,but im not sure how i could use that..But i will propably need to subclass TTTableItem and TTTableItemCell to have custom UI ,so i could just manipulate directly the TTImageView and use the delegate ,is that correct?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜