dondreytaylor / ImageLoaderSwift

A lightweight and fast image loader for iOS written in Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImageLoader

Build-Status CocoaPods Carthage compatible codecov.io license

ImageLoader is an instrument for asynchronous image loading written in Swift. It is a lightweight and fast image loader for iOS.

Features

  • 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 and NSURLComponents by URLLiteralConvertible
  • Optimize to use memory when image is set.
  • Support image type .jpeg, .png
  • Comprehensive Unit Test Coverage

Requirements

  • 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.

Installation

CocoaPods

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

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

Manually

If you prefer not to use either of the aforementioned dependency managers, you can integrate ImageLoader into your project manually.

Embedded Framework

  • 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

Usage

ImageLoader

load

import ImageLoader

ImageLoader.load("http://image").completionHandler { _ in }

suspend

import ImageLoader

ImageLoader.suspend("http://image")

UIImageView Category

import ImageLoader

imageView.load("http://image")

or

import ImageLoader

imageView.load("http://image", placeholder: nil) { _ in ... }

License

ImageLoader is available under the MIT license.

About

A lightweight and fast image loader for iOS written in Swift.

License:MIT License


Languages

Language:Swift 98.1%Language:Ruby 1.5%Language:Objective-C 0.4%