RSDEmbeddedIconVendor

public protocol RSDEmbeddedIconVendor

RSDEmbeddedIconVendor is a convenience protocol for fetching an codable image using an optional RSDImageWrapper. This protocol implements an extension method to fetch the icon.

  • fetchIcon(for:callback:) Extension method

    Fetch the icon. If icon is nil then this will call the callback method asynchronously on the main thread. Otherwise, it will pass through to the image wrapper to use the image wrapper callback.

    Declaration

    Swift

    public func fetchIcon(for size: CGSize, callback: @escaping ((UIImage?) -> Void))

    Parameters

    size

    The size of the image to return.

    callback

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