ImageDownloader
open class ImageDownloader : NSObject
图片下载器,默认解码scale为1,同SDWebImage
-
Undocumented
Declaration
Swift
public static var shared: ImageDownloader
-
Undocumented
Declaration
Swift
public static func defaultURLCache() -> URLCache
-
Undocumented
Declaration
Swift
public static func defaultURLSessionConfiguration() -> URLSessionConfiguration
-
Undocumented
Declaration
Swift
open var imageCache: ImageRequestCache?
-
Undocumented
Declaration
Swift
open var sessionManager: HTTPSessionManager
-
Undocumented
Declaration
Swift
open var downloadPrioritization: ImageDownloadPrioritization
-
Undocumented
Declaration
Swift
public override convenience init()
-
Undocumented
Declaration
Swift
public convenience init(sessionConfiguration: URLSessionConfiguration)
-
Undocumented
Declaration
Swift
public init( sessionManager: HTTPSessionManager, downloadPrioritization: ImageDownloadPrioritization, maximumActiveDownloads: Int, imageCache: ImageRequestCache? )
-
Undocumented
Declaration
Swift
open func downloadImage( for url: Any?, receiptID: UUID = UUID(), options: WebImageOptions, context: [ImageCoderOptions: Any]?, success: ((URLRequest, HTTPURLResponse?, UIImage) -> Void)?, failure: ((URLRequest?, HTTPURLResponse?, Error) -> Void)?, progress: ((Progress) -> Void)? ) -> ImageDownloadReceipt?
-
Undocumented
Declaration
Swift
open func cancelTask(for imageDownloadReceipt: ImageDownloadReceipt)
-
Undocumented
Declaration
Swift
open func imageURL(for object: Any) -> URL?
-
Undocumented
Declaration
Swift
open func imageOperationKey(for object: Any) -> String?
-
Undocumented
Declaration
Swift
open func downloadImage( for object: Any, imageURL: Any?, options: WebImageOptions, context: [ImageCoderOptions: Any]?, placeholder: (() -> Void)?, completion: ((UIImage?, Bool, Error?) -> Void)?, progress: ((Double) -> Void)? )
-
Undocumented
Declaration
Swift
open func cancelImageDownloadTask(_ object: Any)
-
Undocumented
Declaration
Swift
open func loadImageCache(for url: Any?) -> UIImage?
-
Undocumented
Declaration
Swift
open func clearImageCaches(_ completion: (() -> Void)? = nil)