Inherits from NSOperation
Conforms to SDWebImageOperation
Declared in SDWebImageDownloaderOperation.h

Tasks

Properties

credential

@property (nonatomic, strong) NSURLCredential *credential
Discussion

The credential used for authentication challenges in -connection:didReceiveAuthenticationChallenge:.

This will be overridden by any shared credentials that exist for the username or password of the request URL, if present.

Declared In

SDWebImageDownloaderOperation.h

expectedSize

@property (assign, nonatomic) NSInteger expectedSize
Discussion

The expected size of data.

Declared In

SDWebImageDownloaderOperation.h

options

@property (assign, nonatomic, readonly) SDWebImageDownloaderOptions options
Discussion

The SDWebImageDownloaderOptions for the receiver.

Declared In

SDWebImageDownloaderOperation.h

request

@property (strong, nonatomic, readonly) NSURLRequest *request
Discussion

The request used by the operation’s connection.

Declared In

SDWebImageDownloaderOperation.h

response

@property (strong, nonatomic) NSURLResponse *response
Discussion

The response returned by the operation’s connection.

Declared In

SDWebImageDownloaderOperation.h

shouldDecompressImages

@property (assign, nonatomic) BOOL shouldDecompressImages

shouldUseCredentialStorage

@property (nonatomic, assign) BOOL shouldUseCredentialStorage
Discussion

Whether the URL connection should consult the credential storage for authenticating the connection. YES by default.

This is the value that is returned in the NSURLConnectionDelegate method -connectionShouldUseCredentialStorage:.

Declared In

SDWebImageDownloaderOperation.h

Instance Methods

initWithRequest:options:progress:completed:cancelled:

- (id)initWithRequest:(NSURLRequest *)request options:(SDWebImageDownloaderOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageDownloaderCompletedBlock)completedBlock cancelled:(SDWebImageNoParamsBlock)cancelBlock
Discussion

Initializes a SDWebImageDownloaderOperation object

Note: the progress block is executed on a background queue

Note: the completed block is executed on the main queue for success. If errors are found, there is a chance the block will be executed on a background queue

Parameters

request

the URL request

options

downloader options

progressBlock

the block executed when a new chunk of data arrives.

completedBlock

the block executed when the download is done.

cancelBlock

the block executed if the download (operation) is cancelled

Return Value

the initialized instance

Declared In

SDWebImageDownloaderOperation.h