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).
  • Represents the source task identifier when setting an image to a view with extension methods.

    See more

    Declaration

    Swift

    public enum Identifier

Member Cases

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

    Declaration

    Swift

    case network(Resource)
  • 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).

    Declaration

    Swift

    case provider(ImageDataProvider)

Getting Properties

  • The cache key defined for this source value.

    Declaration

    Swift

    public var cacheKey: String { get }
  • 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.

    Declaration

    Swift

    public var url: URL? { get }