Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Swift: Maintain cache for url images

hi everyone,

I am new to SWIFT.

So how to store url images in locally i.e iOS App.

I follow the popular API called SDWebImage, for this I am following steps.

Step1:

get json response from the server via mutable request using with dataTaskWithRequest.


Step2:

2.1: Added SDWebImageView framework to my project

2.1: Then call custom method in the class UIImageView +WebCache

imageView.sd_setImageWithURL(url,

placeholderImage: UIImage(named: "placeholder.png"),

options:SDWebImageOptions.RefreshCached)

is implemented in cellForItemAtIndexPath under custom UICollectionView class.


Step 3: Everything is fine images are loading in the collection view.


NOW I want to show the images again in another view or itself ?

At this time how can I know that those images are either coming from the Server or from Cache in local ?


Thanks in advance

Srikanth

Mac mini, iOS 9.2, XCode 7.2

Posted on Feb 10, 2016 3:22 AM

Reply

There are no replies.

Swift: Maintain cache for url images

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.