geekaurora / CZWebImage

Elegant progressive concurrent image downloading framework, with neat APIs, LRU mem/disk cache.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CZWebImage

Swift Version Carthage compatible License Platform

Elegant progressive concurrent image downloading framework, with neat API and performant LRU mem/disk cache.

How To Use

Objective-C:

#import <CZWebImage/CZWebImage.h>
...
[imageView cz_setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"]
             placeholderImage:[UIImage imageNamed:@"placeholder.png"]];
Swift:

import CZWebImage

// Liner to fetch imageUrl
feedImageView.cz_setImage(with: imageUrl,
                          placeholderImage: UIImage(named: "placeholder.png"))   
                          
// Set cropSize for image - will get done in background thread automatically after download
feedImageView.cz_setImage(with: imageUrl,
                          placeholderImage: UIImage(named: "placeholder.png"),
                          cropSize: cropSize)                          

Work Flow

Debugging

Set shouldObserveOperations of CZWebImageConstants to true to observe downloading tasks.

Instagram Demo - Github

Implemented on top of CZWebImage

About

Elegant progressive concurrent image downloading framework, with neat APIs, LRU mem/disk cache.

License:MIT License


Languages

Language:Swift 100.0%