ImageLoader is an instrument for asynchronous image loading written in Swift. It is a lightweight and fast image loader for iOS.
- Simple methods with UIImageView Category.
- A module for cache can be set by yourself.
- Diskcache for default settings, the module for cache use on disk and unused on memory.
- 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
- Control Loader to resume, suspend and cancel with URL.
- Enable to set
NSURL
andString
on.load(URL)
- iOS 7.0+
- Xcode 6.1+ Swift 1.1+
ImageLoader | Xcode | Swift | travis-ci |
---|---|---|---|
0.2.x | 6.1, 6.2 | 1.1 | |
0.3.x | 6.3, 6.4 | 1.2 |
If your project's target need to support iOS5.x or 6.x, use ImageLoader. It's A lightweight and fast image loader for iOS written in Objective-C.
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
- Install with CocoaPods to write Podfile
pod 'ImageLoader'
- Copy ImageLoader class files into your project
load
ImageLoader.load("http://image").completionHandler { _ in }
suspend
ImageLoader.suspend("http://image")
imageView.load("http://image")
or
imageView.load("http://image", placeholder: nil) { _ in ... }
ImageLoader is available under the MIT license.