Kingfisher Documentation

Structure Base64Image​Data​Provider

public struct Base64ImageDataProvider: ImageDataProvider  

Represents an image data provider for loading image from a given Base64 encoded string.

%193 Base64ImageDataProvider Base64ImageDataProvider ImageDataProvider ImageDataProvider Base64ImageDataProvider->ImageDataProvider

Conforms To

ImageDataProvider

Represents a data provider to provide image data to Kingfisher when setting with Source.provider source. Compared to Source.network member, it gives a chance to load some image data in your own way, as long as you can provide the data representation for the image.

Initializers

init(base64String:​cache​Key:​)

public init(base64String: String, cacheKey: String)  

Creates an image data provider by supplying the Base64 encoded string.

Parameters

base64String String

The Base64 encoded string for an image.

cache​Key String

The key is used for caching the image data. You need a different key for any different image.

Properties

base64String

public let base64String: String

The encoded Base64 string for the image.

cache​Key

public var cacheKey: String

The key used in cache.

Methods

data(handler:​)

public func data(handler: (Result<Data, Error>) -> Void)