https://github.com/orucanil/alamofireimagecache
Simple cache images while downloading images. You do not need to download the same picture over and over again during the cache age. Easy to use.
https://github.com/orucanil/alamofireimagecache
alamofireimage cache cache-storage ios memcached swift uiimageview
Last synced: 3 months ago
JSON representation
Simple cache images while downloading images. You do not need to download the same picture over and over again during the cache age. Easy to use.
- Host: GitHub
- URL: https://github.com/orucanil/alamofireimagecache
- Owner: orucanil
- License: mit
- Created: 2017-07-24T07:25:20.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-25T05:29:24.000Z (almost 8 years ago)
- Last Synced: 2025-01-09T03:11:44.002Z (4 months ago)
- Topics: alamofireimage, cache, cache-storage, ios, memcached, swift, uiimageview
- Language: Swift
- Homepage: https://www.linkedin.com/in/annul
- Size: 139 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AlamofireImageCache
Using AlamofireImage and ANWCacheManager, you can cache images while downloading images. You do not need to download the same picture over and over again during the cache age. Easy to use.
Installation
--------------To use the AlamofireImageCache in an app, install AlamofireImage and just drag the AlamofireImageCache files in Classes folder (demo files and assets are not needed) into your project. ( https://github.com/Alamofire/AlamofireImage ). Add "#import " into Bridging-Header.
Properties
--------------The AlamofireImageCache has the following properties (note: for iOS, UIImageView when using properties):
var isImageLoading: Bool
Image loading flag.
Methods
--------------The AlamofireImageCache has the following methods (note: for iOS, UIImageView in method arguments):
func setImage(urlString: String?, closure: LoadImageClosure? = nil)
Image loading method with url string and complition block. (Use AlamofireImage for image loading. When finished loading, cached image.)
How to use ?
----------```Swift
imageView.setImage(urlString: "http://static2.bergfex.com/images/downsized/12/e185569f232e7012_8317a8e7573a6a43.jpg")
```
Build and run the project files. Enjoy more examples!