ImageLoader is an instrument for asynchronous image loading.
- Simple methods with UIImageView Category.
- A module for cache can be set by yourself.
- Loading images is handled by ImageLoader, not UIImageView.
- After image view start loading another image, previous loading task is possible to live with caching.
- Comprehensive Unit Test Coverage
- Optimize image with frame and scale
iOS 7.0+ Xcode 6.1
It is the way to use this in your project:
- Add ImageLoader as a submodule by opening the Terminal, trying to enter the command
git submodule add https://github.com/hirohisa/ImageLoaderSwift.git
- Copy ImageLoader class files into your project
let URL: NSURL = NSURL(string: "http://image")!
imageView.setImage(URL)
or
let URL: NSURL = NSURL(string: "http://image")!
imageView.setImage(URL, placeholder: nil, success: { _ in ...}, failure: { _ in ...})
or
let URL: NSURL = NSURL(string: "http://image")!
imageView.setImage(URL, placeholder: nil, completion: { _ in ... })
ImageLoader is available under the MIT license.