So, i have an application with a tableview that shows images from web (doesn’t matter from where)
when the view loads the downloads start, but i want to build a cache to download only the images that i don’t have on the cache.
i’ve seen tutorials to download and save on disk, but how can i implement this validation?
only download IF not local, and if local show the local.
how can i get this images dynamically?
like almost using the method imageNamed so when i need to build the table view i just call [MyClass getImageWithName:(name) and if exists, return my image, if not put it on download queue
just to make things clear, my question is: “How can i get easily one image from documents folder?”
Do following things:
This method will return Your Images Path under Document Directory
Now You have image Name So we will check in Images Directory whether its exits or not. if exits then use that img or download img and then store it
// this code will be cellForRowAtIndexPath