Latest | 0.5.4 |
---|---|
Homepage | https://github.com/comquas/CQImageDownloader |
License | MIT |
Platforms | ios 8.0 |
Authors |
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")
Latest podspec
{ "name": "CQImageDownloader", "version": "0.5.4", "summary": "Simple Async Image Downloader with progress", "description": "Simple Async Image Downloader using NSURLSession. Small library and easy to use. Supporting progress to use with progress view", "homepage": "https://github.com/comquas/CQImageDownloader", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { "Saturngod": "[email protected]" }, "source": { "git": "https://github.com/comquas/CQImageDownloader.git", "tag": "0.5.4" }, "platforms": { "ios": "8.0" }, "source_files": "CQImageDownloader/Classes/*.swift", "pushed_with_swift_version": "3.0" }
Thu, 02 Feb 2017 09:00:03 +0000