Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iphone: Smart way to cache large number of images?

I have a UITableView that displays hundreds of images that are downloaded from the web. Of course I don't want to keep all the images in the RAM - I need to create a small "cache" of images in the RAM and write the images that I don't need right now to the "disk". Of course I don't want this mechanism to hinder the UI (Too many reads and writes to the disk/flash drive on the main thread). What's the best and easy way to implement such a thing? Are there any open source projects that use such a thing, I can look at?

like image 496
Alex1987 Avatar asked Nov 14 '22 22:11

Alex1987


1 Answers

Check out the Three20 library, especially the TTURLRequest, TTURLCache and TTImageView classes.

like image 167
spacehunt Avatar answered Dec 09 '22 16:12

spacehunt