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.
- Control Loader to resume, suspend and cancel with URL.
- A module for cache can be set by yourself and default cache (Disk) uses disk spaces and un-uses 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.
- Support
NSURL
,String
andNSURLComponents
byURLLiteralConvertible
- Optimize to use memory when image is set.
- Support image type .jpeg, .png
- Comprehensive Unit Test Coverage
- iOS 8.0+
- Xcode 7.0+ Swift 2.0
ImageLoader | Xcode | Swift |
---|---|---|
0.3.x | 6.4 | 1.2 |
0.4+ | 7.0+ | 2.0 |
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.
CocoaPods is a dependency manager for Cocoa projects.
To integrate ImageLoader 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 'ImageLoader'
Then, run the following command:
$ pod install
Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate ImageLoader into your Xcode project using Carthage, specify it in your Cartfile
:
github "hirohisa/ImageLoaderSwift" ~> 0.6.0
If you prefer not to use either of the aforementioned dependency managers, you can integrate ImageLoader into your project manually.
-
Open up Terminal,
cd
into your top-level project directory, and run the following command "if" your project is not initialized as a git repository: -
Add ImageLoader as a git submodule by running the following command:
$ git submodule add https://github.com/hirohisa/ImageLoaderSwift.git
load
import ImageLoader
ImageLoader.load("http://image").completionHandler { _ in }
suspend
import ImageLoader
ImageLoader.suspend("http://image")
import ImageLoader
imageView.load("http://image")
or
import ImageLoader
imageView.load("http://image", placeholder: nil) { _ in ... }
ImageLoader is available under the MIT license.