UIImageView(HighlightedWebCache)

@interface UIImageView (HighlightedWebCache)

Integrates SDWebImage async downloading and caching of remote images with UIImageView for highlighted state.

  • Set the imageView highlightedImage with an url.

    The download is asynchronous and cached.

    Declaration

    Objective-C

    - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url;

    Swift

    func __sd_setHighlightedImage(with url: URL?)

    Parameters

    url

    The url for the image.

  • Set the imageView highlightedImage with an url and custom options.

    The download is asynchronous and cached.

    Declaration

    Objective-C

    - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url
                                  options:(SDWebImageOptions)options;

    Swift

    func __sd_setHighlightedImage(with url: URL?, options: SDWebImageOptions = [])

    Parameters

    url

    The url for the image.

    options

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

  • Set the imageView highlightedImage with an url, custom options and context.

    The download is asynchronous and cached.

    Declaration

    Objective-C

    - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url
                                  options:(SDWebImageOptions)options
                                  context:(nullable SDWebImageContext *)context;

    Swift

    func sd_setHighlightedImage(with url: URL?, options: SDWebImageOptions = [], context: [SDWebImageContextOption : Any]?)

    Parameters

    url

    The url for the image.

    options

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

    context

    A context contains different options to perform specify changes or processes, see SDWebImageContextOption. This hold the extra objects which options enum can not hold.

  • Set the imageView highlightedImage with an url.

    The download is asynchronous and cached.

    Declaration

    Objective-C

    - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url
                                completed:(nullable SDExternalCompletionBlock)
                                              completedBlock;

    Swift

    func __sd_setHighlightedImage(with url: URL?, completed completedBlock: SDExternalCompletionBlock? = nil)

    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 retrieved from the local cache or from the network. The fourth parameter is the original image url.

  • Set the imageView highlightedImage with an url and custom options.

    The download is asynchronous and cached.

    Declaration

    Objective-C

    - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url
                                  options:(SDWebImageOptions)options
                                completed:(nullable SDExternalCompletionBlock)
                                              completedBlock;

    Swift

    func sd_setHighlightedImage(with url: URL?, options: SDWebImageOptions = [], completed completedBlock: SDExternalCompletionBlock? = nil)

    Parameters

    url

    The url for the image.

    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 retrieved from the local cache or from the network. The fourth parameter is the original image url.

  • Set the imageView highlightedImage with an url and custom options.

    The download is asynchronous and cached.

    Declaration

    Objective-C

    - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url
                                  options:(SDWebImageOptions)options
                                 progress:(nullable SDImageLoaderProgressBlock)
                                              progressBlock
                                completed:(nullable SDExternalCompletionBlock)
                                              completedBlock;

    Swift

    func sd_setHighlightedImage(with url: URL?, options: SDWebImageOptions = [], progress progressBlock: SDImageLoaderProgressBlock?, completed completedBlock: SDExternalCompletionBlock? = nil)

    Parameters

    url

    The url for the image.

    options

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

    progressBlock

    A block called while image is downloading - note: the progress block is executed on a background queue

    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 retrieved from the local cache or from the network. The fourth parameter is the original image url.

  • Set the imageView highlightedImage with an url, custom options and context.

    The download is asynchronous and cached.

    Declaration

    Objective-C

    - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url
                                  options:(SDWebImageOptions)options
                                  context:(nullable SDWebImageContext *)context
                                 progress:(nullable SDImageLoaderProgressBlock)
                                              progressBlock
                                completed:(nullable SDExternalCompletionBlock)
                                              completedBlock;

    Swift

    func sd_setHighlightedImage(with url: URL?, options: SDWebImageOptions = [], context: [SDWebImageContextOption : Any]?, progress progressBlock: SDImageLoaderProgressBlock?, completed completedBlock: SDExternalCompletionBlock? = nil)

    Parameters

    url

    The url for the image.

    options

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

    context

    A context contains different options to perform specify changes or processes, see SDWebImageContextOption. This hold the extra objects which options enum can not hold.

    progressBlock

    A block called while image is downloading - note: the progress block is executed on a background queue

    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 retrieved from the local cache or from the network. The fourth parameter is the original image url.