Reputation: 107
I'm struggling a bit with the TTImageView because of the cache policy. I cannot just disable the cache.
I'm looking for a way to know if the image displayed is loaded from the local cache or if it has been retrieved from the network.
Is there a way to do so ? WEll I mean there has to be a way somehow.
Any help appreciated. Thank you.
Upvotes: 0
Views: 333
Reputation: 1388
Check if the image is in the cache like this before you set the url for the TTImageView:
UIImage* image = [[TTURLCache sharedCache] imageForURL:URL];
if image is not nil it means it is in the cache and will come from the cache if you set the url to a TTImageView
Upvotes: 4