Kingfisher Documentation

Structure Any​Image​Modifier

public struct AnyImageModifier: ImageModifier  

A wrapper for creating an ImageModifier easier. This type conforms to ImageModifier and wraps an image modify block. If the block throws an error, the original image will be used.

%257 AnyImageModifier AnyImageModifier ImageModifier ImageModifier AnyImageModifier->ImageModifier

Conforms To

ImageModifier

An ImageModifier can be used to change properties on an image between cache serialization and the actual use of the image. The modify(_:) method will be called after the image retrieved from its source and before it returned to the caller. This modified image is expected to be only used for rendering purpose, any changes applied by the ImageModifier will not be serialized or cached.

Initializers

init(modify:​)

public init(modify: @escaping (KFCrossPlatformImage) throws -> KFCrossPlatformImage)  

Creates an AnyImageModifier with a given modify block.

Methods

modify(_:​)

public func modify(_ image: KFCrossPlatformImage) -> KFCrossPlatformImage  

Modify an input Image. See ImageModifier protocol for more.