CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

CQImageDownloader 0.5.4

CQImageDownloader 0.5.4

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Dec 2016
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Saturngod.



  • By
  • Saturngod

With CocoaPod

add

pod "CQImageDownloader"

Manual

copy to CQImageDownloader/Classes/CQImageDownloader.swift to your project.

Usage

Download and Show

imageView.setCQImage("https://unsplash.com/photos/BO5BswJwguI/download?force=true")
imageView.setCQImage("https://unsplash.com/photos/BO5BswJwguI/download?force=true", placeholder: placeholderImage)

Downloading with progress

imageView.setCQImage("https://unsplash.com/photos/BO5BswJwguI/download?force=true", placeholder: nil, progress: { (value: Float) in

    //supporting progress        
    print(value)

})

Downloading with completion

imageView.setCQImage("https://unsplash.com/photos/BO5BswJwguI/download?force=true", placeholder: nil, progress: nil, completion: { (image:UIImage?, success:Bool) in

    if (success) {

    }

})

Clear Cache

CQImageDownloader.clearAllTheCachedImages()
var downloader = CQImageDownloader()
downloader.deleteCacheImage("file URL")