Kingfisher Documentation

Structure Any​Modifier

public struct AnyModifier: ImageDownloadRequestModifier  

A wrapper for creating an ImageDownloadRequestModifier easier. This type conforms to ImageDownloadRequestModifier and wraps an image modify block.

%123 AnyModifier AnyModifier ImageDownloadRequestModifier ImageDownloadRequestModifier AnyModifier->ImageDownloadRequestModifier

Conforms To

ImageDownloadRequestModifier

Represents and wraps a method for modifying request before an image download request starts.

Initializers

init(modify:​)

public init(modify: @escaping (URLRequest) -> URLRequest?)  

Creates a value of ImageDownloadRequestModifier which runs modify block.

Parameters

modify @escaping (URLRequest) -> URLRequest?

The request modifying block runs when a request modifying task comes. The return URLRequest? value of this block will be used as the image download request. If nil returned, a KingfisherError.requestError with .emptyRequest as its reason will occur.

Methods

modified(for:​)

public func modified(for request: URLRequest) -> URLRequest?  

For ImageDownloadRequestModifier conformation.