Latest 1.0.0
Homepage https://github.com/airG/iOS-airImageCache
License Apache License, Version 2.0
Platforms ios 8.0
Authors

Documentation
Carthage compatible

An extremely simple UIImage cache manager backed by both an in-memory NSCache and file system /Caches folder.

Installation

Installation is best managed using Carthage. Add github "airg/iOS-airImageCache" to your cartfile and run carthage install, see Carthage Installation Guide.

You can also use Cocoapods to install. Add pod 'airImageCache' to your podfile.

How to use airImageCache

On AirImageCache call image(for: key, completion: (UIImage?) -> Void). There is no guarantee how long it will take to have the completion called, since you may be loading the image out of memory, off the disk or from the server. This returns a URLSessionDataTask?, which can be cancelled if you want to stop the server load.

To load images off a server, provide an object conforming to AirImageURLProviding, which only need to implement func url(for key: String) -> URL?.

This framework also provides an extension on UIImageView, to conveniently load and set the image, or cancel the download task associated with the image view.

Documentation

Check out the documentation. All calls should also be documented in the generated Swift interface.

How it’s made

airImageCache is currently written in Swift 4 with Xcode 9.2.

Documentation is generated using Jazzy, a very useful tool for generating pretty docs.

Contributing

Before opening a pull request, be sure to run jazzy to regenerate the docs.

Latest podspec

{
    "name": "airImageCache",
    "version": "1.0.0",
    "summary": "An basic UIImage cache manager backed by both an in-memory NSCache and file system /Caches folder.",
    "description": "An extremely simple UIImage cache manager backed by both an in-memory NSCache and file system /Caches folder.",
    "homepage": "https://github.com/airG/iOS-airImageCache",
    "license": "Apache License, Version 2.0",
    "authors": {
        "Steven Thompson": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/airG/iOS-airImageCache.git",
        "tag": "1.0.0"
    },
    "source_files": [
        "AirImageCache",
        "AirImageCache/**/*.{h,m,swift}"
    ],
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This