iOS UIImageView subclass - download image with different progress indicators
Just add LASIImageView class files to the project and set the imageUrl property to download and display the image.
Three types of progress indicators are available (as in the screenshot above):
- LProgressTypeAnnular
- LProgressTypeCircle
- LProgressTypePie
It is possible to set shared appearance. Setting appearance for particular LASIImageView instance will override global appearance.
[[LASIImageView sharedProgressAppearance] setSchemeColor:[UIColor whiteColor]];
[[LASIImageView sharedASIImageViewAppearance] setDownloadFailedImageName:@"downloadFailed.png"];
@property (assign, nonatomic) ASICachePolicy cachePolicy;
@property (assign, nonatomic) ASICacheStoragePolicy cacheStoragePolicy;
@property (weak, nonatomic) id <ASICacheDelegate> cacheDelegate;
@property (assign, nonatomic) NSUInteger secondsToCache;
@property (assign, nonatomic) NSUInteger timeOutSeconds;
On request finished - success or fail blocks are called (LASIImageViewDownloadFinishedBlock or LASIImageViewDownloadFailedBlock)