Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

apploft/APLImageCache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

APLImageCache

A simple wrapper for the FastImageCache.

  • Easy setup
  • Provides UIImageView category for requesting and cancelling.
  • Support for custom image downloader classes.

Installation

Install via cocoapods by adding this to your Podfile:

pod "APLImageCache", "~> 0.0.5"

Usage

Import header file:

#import <APLImageCache/APLImageCache.h>

Setup:

An example that caches two types of images (user photos and book covers):

NSDictionary *coverDescription = @{ APLImageType : @"bookCover", APLImageWidth : @90, APLImageHeight : @135 };
NSDictionary *photoDescription = @{ APLImageType : @"userPhoto", APLImageWidth : @50, APLImageHeight : @50 };
[APLImageCache setupWithDownloader:nil descriptions:@[coverDescription, photoDescription]];

The best place for this is the method 'application:didFinishLaunchingWithOptions:' in the AppDelegate.

Request:

[self.imageView requestImageWithURL:book.coverURL type:@"bookCover" placeholder:placeholder];

Cancel:

[self.imageView cancelImageRequest];

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published