SDWebImageDownloader Class Reference
| Inherits from | NSObject |
| Declared in | SDWebImageDownloader.h SDWebImageDownloader.m |
Tasks
-
queueModeChanges download operations unqueue mode. Default value is
propertySDWebImageDownloaderFILOQueueMode. -
– setValue:forHTTPHeaderField:Set a value for a HTTP header to be appended to each download HTTP request.
-
– valueForHTTPHeaderField:Returns the value of the specified HTTP header field.
-
– downloadImageWithURL:options:progress:completed:Creates a SDWebImageDownloader async downloader instance with a given URL
Properties
queueMode
Changes download operations unqueue mode. Default value is SDWebImageDownloaderFILOQueueMode.
@property (assign, nonatomic) SDWebImageDownloaderQueueMode queueModeDiscussion
Changes download operations unqueue mode. Default value is SDWebImageDownloaderFILOQueueMode.
Declared In
SDWebImageDownloader.hInstance Methods
downloadImageWithURL:options:progress:completed:
Creates a SDWebImageDownloader async downloader instance with a given URL
- (id<SDWebImageOperation>)downloadImageWithURL:(NSURL *)url options:(SDWebImageDownloaderOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageDownloaderCompletedBlock)completedBlockParameters
- url
The URL to the image to download
- options
The options to be used for this download
- completed
A block called once the download is completed. If the download succeeded, the image parameter is set, in case of error, error parameter is set with the error. The last parameter is always YES if SDWebImageDownloaderProgressiveDownload isn’t use. With the SDWebImageDownloaderProgressiveDownload option, this block is called repeatedly with the partial image object and the finished argument set to NO before to be called a last time with the full image and finished argument set to YES. In case of error, the finished argument is always YES.
- progress
A block called repeatedly while the image is downloading
Return Value
A cancellable SDWebImageOperation
Discussion
Creates a SDWebImageDownloader async downloader instance with a given URL
The delegate will be informed when the image is finish downloaded or an error has happen.
Declared In
SDWebImageDownloader.hsetValue:forHTTPHeaderField:
Set a value for a HTTP header to be appended to each download HTTP request.
- (void)setValue:(NSString *)value forHTTPHeaderField:(NSString *)fieldParameters
- value
The value for the header field. Use
nilvalue to remove the header.
- field
The name of the header field to set.
Discussion
Set a value for a HTTP header to be appended to each download HTTP request.
Declared In
SDWebImageDownloader.hvalueForHTTPHeaderField:
Returns the value of the specified HTTP header field.
- (NSString *)valueForHTTPHeaderField:(NSString *)fieldReturn Value
The value associated with the header field field, or nil if there is no corresponding header field.
Discussion
Returns the value of the specified HTTP header field.
Declared In
SDWebImageDownloader.h