DefaultCarouselImageLoader

public class DefaultCarouselImageLoader : CarouselImageLoader

Default image loader class which uses a URLSession to load images

  • Undocumented

    Declaration

    Swift

    public let urlSession: URLSession
  • Undocumented

    Declaration

    Swift

    public init(urlSession: URLSession = .shared)
  • Load image from url (callback queue will be on main)

    Declaration

    Swift

    public func loadImage(url: URL, completion: ((UIImage?, Error?) -> Void)?)

    Parameters

    url

    image url

    completion

    callback with image on success or error on failure

  • Load image from url

    Declaration

    Swift

    public func loadImage(url: URL, queue: DispatchQueue, completion: ((UIImage?, Error?) -> Void)?)

    Parameters

    url

    image url

    queue

    queue to call completion on

    completion

    callback with image on success or error on failure

  • Undocumented

    Declaration

    Swift

    public func cancelImageLoad(from url: URL)