Kingfisher Documentation

Protocol Image​Modifier

public protocol 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.

%109 ImageModifier ImageModifier FlipsForRightToLeftLayoutDirectionImageModifier FlipsForRightToLeftLayoutDirectionImageModifier FlipsForRightToLeftLayoutDirectionImageModifier->ImageModifier AnyImageModifier AnyImageModifier AnyImageModifier->ImageModifier AlignmentRectInsetsImageModifier AlignmentRectInsetsImageModifier AlignmentRectInsetsImageModifier->ImageModifier RenderingModeImageModifier RenderingModeImageModifier RenderingModeImageModifier->ImageModifier

Types Conforming to Image​Modifier

AnyImageModifier

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.

RenderingModeImageModifier

Modifier for setting the rendering mode of images.

FlipsForRightToLeftLayoutDirectionImageModifier

Modifier for setting the flipsForRightToLeftLayoutDirection property of images.

AlignmentRectInsetsImageModifier

Modifier for setting the alignmentRectInsets property of images.

Requirements

modify(_:​)

func modify(_ image: KFCrossPlatformImage) -> KFCrossPlatformImage

Modify an input Image.

Parameters

image KFCross​Platform​Image

Image which will be modified by self

Returns

The modified image.