Kingfisher Documentation

Enumeration Source

public enum Source  

Represents an image setting source for Kingfisher methods.

A Source value indicates the way how the target image can be retrieved and cached.

  • network: The target image should be got from network remotely. The associated Resource value defines detail information like image URL and cache key.

  • provider: The target image should be provided in a data format. Normally, it can be an image from local storage or in any other encoding format (like Base64).

%135 Source Source Hashable Hashable Source->Hashable

Nested Types

Source.Identifier

Represents the source task identifier when setting an image to a view with extension methods.

Conforms To

Hashable

Enumeration Cases

network

case network(Resource) 

The target image should be got from network remotely. The associated Resource value defines detail information like image URL and cache key.

provider

case provider(ImageDataProvider) 

The target image should be provided in a data format. Normally, it can be an image from local storage or in any other encoding format (like Base64).

Properties

cache​Key

public var cacheKey: String  

The cache key defined for this source value.

url

public var url: URL?  

The URL defined for this source value.

For a .network source, it is the downloadURL of associated Resource instance. For a .provider value, it is always nil.

Methods

hash(into:​)

public func hash(into hasher: inout Hasher)  

Operators

==

public static func == (lhs: Source, rhs: Source) -> Bool