RSDImageVendor

public protocol RSDImageVendor

RSDImageVendor is a protocol for defining an abstract method for fetching an image.

  • A unique identifier that can be used to validate that the image shown in a reusable view is the same image as the one fetched.

    Declaration

    Swift

    var imageIdentifier: String { get }
  • The size of the image.

    Declaration

    Swift

    var size: CGSize { get }
  • Fetch the image.

    Declaration

    Swift

    func fetchImage(for size: CGSize, callback: @escaping ((String?, RSDImage?) -> Void))

    Parameters

    size

    The size of the image to return.

    callback

    The callback with the identifier and image, run on the main thread.