CarouselImageLoader
public protocol CarouselImageLoader : AnyObject
Protocol used to load an image from url
-
Load image from url
Declaration
Swift
func loadImage(url: URL, completion: ((_ image: UIImage?, _ error: Error?) -> Void)?)Parameters
urlimage url
completioncallback with image on success or error on failure
-
Load image from url
Declaration
Swift
func loadImage( url: URL, cachePolicy: URLRequest.CachePolicy, queue: DispatchQueue, completion: ((UIImage?, Error?) -> Void)? )Parameters
urlimage url
cachePolicycache policy for the requested image data
queuequeue to call completion on
completioncallback with image on success or error on failure
-
Cancels image loading for a given url
Declaration
Swift
func cancelImageLoad(from url: URL)