ImageResource
public struct ImageResource: Resource
ImageResource is a simple combination of downloadURL and cacheKey.
When passed to image view set methods, Kingfisher will try to download the target
image from the downloadURL, and then store it with the cacheKey as the key in cache.
-
The key used in cache.
Declaration
Swift
public let cacheKey: String -
The target image URL.
Declaration
Swift
public let downloadURL: URL -
Create a resource.
Declaration
Swift
public init(downloadURL: URL, cacheKey: String? = nil)Parameters
downloadURLThe target image URL.
cacheKeyThe cache key. If
nil, Kingfisher will use theabsoluteStringofdownloadURLas the key.Return Value
A resource.
View on GitHub
Install in Dash
ImageResource Structure Reference