84 lines
3.6 KiB
Objective-C
84 lines
3.6 KiB
Objective-C
/*
|
|
* This file is part of the SDWebImage package.
|
|
* (c) Olivier Poitrey <rs@dailymotion.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
#import <UIKit/UIKit.h>
|
|
#import "SDWebImageCompat.h"
|
|
#import "SDWebImageManager.h"
|
|
|
|
/**
|
|
* Integrates SDWebImage async downloading and caching of remote images with UIImageView for highlighted state.
|
|
*/
|
|
@interface UIImageView (HighlightedWebCache)
|
|
|
|
/**
|
|
* Set the imageView `highlightedImage` with an `url`.
|
|
*
|
|
* The downloand is asynchronous and cached.
|
|
*
|
|
* @param url The url for the image.
|
|
*/
|
|
- (void)setHighlightedImageWithURL:(NSURL *)url;
|
|
/**
|
|
* Set the imageView `highlightedImage` with an `url` and custom options.
|
|
*
|
|
* The downloand is asynchronous and cached.
|
|
*
|
|
* @param url The url for the image.
|
|
* @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
|
|
*/
|
|
- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options;
|
|
|
|
/**
|
|
* Set the imageView `highlightedImage` with an `url`.
|
|
*
|
|
* The downloand is asynchronous and cached.
|
|
*
|
|
* @param url The url for the image.
|
|
* @param completedBlock A block called when operation has been completed. This block as no return value
|
|
* and takes the requested UIImage as first parameter. In case of error the image parameter
|
|
* is nil and the second parameter may contain an NSError. The third parameter is a Boolean
|
|
* indicating if the image was retrived from the local cache of from the network.
|
|
*/
|
|
- (void)setHighlightedImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock;
|
|
|
|
/**
|
|
* Set the imageView `highlightedImage` with an `url` and custom options.
|
|
*
|
|
* The downloand is asynchronous and cached.
|
|
*
|
|
* @param url The url for the image.
|
|
* @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
|
|
* @param completedBlock A block called when operation has been completed. This block as no return value
|
|
* and takes the requested UIImage as first parameter. In case of error the image parameter
|
|
* is nil and the second parameter may contain an NSError. The third parameter is a Boolean
|
|
* indicating if the image was retrived from the local cache of from the network.
|
|
*/
|
|
- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock;
|
|
|
|
/**
|
|
* Set the imageView `highlightedImage` with an `url` and custom options.
|
|
*
|
|
* The downloand is asynchronous and cached.
|
|
*
|
|
* @param url The url for the image.
|
|
* @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
|
|
* @param progressBlock A block called while image is downloading
|
|
* @param completedBlock A block called when operation has been completed. This block as no return value
|
|
* and takes the requested UIImage as first parameter. In case of error the image parameter
|
|
* is nil and the second parameter may contain an NSError. The third parameter is a Boolean
|
|
* indicating if the image was retrived from the local cache of from the network.
|
|
*/
|
|
- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock;
|
|
|
|
/**
|
|
* Cancel the current download
|
|
*/
|
|
- (void)cancelCurrentHighlightedImageLoad;
|
|
|
|
@end
|