Elegant progressive concurrent image downloading framework, with neat API and performant LRU mem/disk cache.
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)
Set shouldObserveOperations
of CZWebImageConstants
to true
to observe downloading tasks.
Instagram Demo - Github
Implemented on top of CZWebImage