Kingfisher Documentation

Structure Image​Creating​Options

public struct ImageCreatingOptions  

Represents a set of image creating options used in Kingfisher.

Initializers

init(scale:​duration:​preload​All:​only​First​Frame:​)

public init(
        scale: CGFloat = 1.0,
        duration: TimeInterval = 0.0,
        preloadAll: Bool = false,
        onlyFirstFrame: Bool = false) 

Creates an ImageCreatingOptions object.

Parameters

scale CGFloat

The target scale of image needs to be created. Default is 1.0.

duration Time​Interval

The expected animation duration if an animated image being created. A value less or equal to 0.0 means the animated image duration will be determined by the frame data. Default is 0.0.

preload​All Bool

For an animated image, whether or not all frames should be loaded before displaying. Default is false.

only​First​Frame Bool

For an animated image, whether or not only the first image should be loaded as a static image. It is useful for preview purpose of an animated image. Default is false.

Properties

scale

public let scale: CGFloat

The target scale of image needs to be created.

duration

public let duration: TimeInterval

The expected animation duration if an animated image being created.

preload​All

public let preloadAll: Bool

For an animated image, whether or not all frames should be loaded before displaying.

only​First​Frame

public let onlyFirstFrame: Bool

For an animated image, whether or not only the first image should be loaded as a static image. It is useful for preview purpose of an animated image.