Declared in MKAnnotationView+WebCache.h

Overview

Integrates SDWebImage async downloading and caching of remote images with MKAnnotationView.

Tasks

Instance Methods

sd_cancelCurrentImageLoad

- (void)sd_cancelCurrentImageLoad
Discussion

Cancel the current download

Declared In

MKAnnotationView+WebCache.h

sd_imageURL

- (NSURL *)sd_imageURL
Discussion

Get the current image URL.

Note that because of the limitations of categories this property can get out of sync if you use sd_setImage: directly.

Declared In

MKAnnotationView+WebCache.h

sd_setImageWithURL:

- (void)sd_setImageWithURL:(NSURL *)url
Discussion

Set the imageView image with an url.

The download is asynchronous and cached.

Parameters

url

The url for the image.

Declared In

MKAnnotationView+WebCache.h

sd_setImageWithURL:completed:

- (void)sd_setImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock
Discussion

Set the imageView image with an url.

The download is asynchronous and cached.

Parameters

url

The url for the image.

completedBlock

A block called when operation has been completed. This block has 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 or from the network. The fourth parameter is the original image url.

Declared In

MKAnnotationView+WebCache.h

sd_setImageWithURL:placeholderImage:

- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder
Discussion

Set the imageView image with an url and a placeholder.

The download is asynchronous and cached.

Parameters

url

The url for the image.

placeholder

The image to be set initially, until the image request finishes.

Declared In

MKAnnotationView+WebCache.h

sd_setImageWithURL:placeholderImage:completed:

- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock
Discussion

Set the imageView image with an url, placeholder.

The download is asynchronous and cached.

Parameters

url

The url for the image.

placeholder

The image to be set initially, until the image request finishes.

completedBlock

A block called when operation has been completed. This block has 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 or from the network. The fourth parameter is the original image url.

Declared In

MKAnnotationView+WebCache.h

sd_setImageWithURL:placeholderImage:options:

- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options
Discussion

Set the imageView image with an url, placeholder and custom options.

The download is asynchronous and cached.

Parameters

url

The url for the image.

placeholder

The image to be set initially, until the image request finishes.

options

The options to use when downloading the image. @see SDWebImageOptions for the possible values.

Declared In

MKAnnotationView+WebCache.h

sd_setImageWithURL:placeholderImage:options:completed:

- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock
Discussion

Set the imageView image with an url, placeholder and custom options.

The download is asynchronous and cached.

Parameters

url

The url for the image.

placeholder

The image to be set initially, until the image request finishes.

options

The options to use when downloading the image. @see SDWebImageOptions for the possible values.

completedBlock

A block called when operation has been completed. This block has 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 or from the network. The fourth parameter is the original image url.

Declared In

MKAnnotationView+WebCache.h