CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | SwiftSwift |
| License | MIT |
| ReleasedLast Release | Dec 2017 |
| SwiftSwift Version | 4.0 |
| SPMSupports SPM | ✓ |
Maintained by Luan Tran.
Helper framework to cache image with url in Swift iOS.
To integrate PhotoCollectionView into your Xcode project using CocoaPods, specify it in your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'SwiftyImageCache', '~> 1.1.2'Then, run the following command:
$ pod installSources folder into your project.Set url to imageview.
imageView.setUrl(url)Design for UITableView/UICollectionView asynchronous image. Only need setUrl from any UIImageView in UITableViewCell/UICollectionViewCell.
Use ImageCache object to cache your image from URL
let cache = ImageCache()
cache.loadImage(atUrl: url, completion: { (urlString, image) in
})or use default cache
ImageCache.default.loadImage(atUrl: url, completion: { (urlString, image) in
})You can config cacheType
ImageCache.default.cacheType = .disk // (default mode, recommendation)
ImageCache.default.cacheType = .ram