mikaoj / URLImageCache

Simple in memory image cache written in Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

URLImageCache

[![CI Status](http://img.shields.io/travis/Joakim Gyllstrom/URLImageCache.svg?style=flat)](https://travis-ci.org/Joakim Gyllstrom/URLImageCache) Version License Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

import URLImageCache

Fetch an image:

URLImageCache.imageForURL(imageURL, completion: { (image) -> () in
  // Do something with image?
})

Using the UIImageView extension

// Set image with an URL
imageView.bs_setImageWithURL(imageURL)

// Use an optional placeholder while fetching
imageView.bs_setImageWithURL(imageURL, placeholder: UIImage(named: "troll"))

Requirements

Installation

Using cocoapods...if I push the podspec to trunk.

Author

Joakim Gyllström, joakim@backslashed.se

License

URLImageCache is available under the MIT license. See the LICENSE file for more info.

About

Simple in memory image cache written in Swift

License:MIT License


Languages

Language:Swift 46.0%Language:Shell 42.0%Language:Ruby 5.2%Language:Objective-C 4.0%Language:C 2.7%