ImageDownloader
open class ImageDownloader : NSObject, @unchecked Sendable
图片下载器,默认解码scale为1,同SDWebImage
-
Undocumented
Declaration
Swift
public static let 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
override public 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: (@MainActor @Sendable (URLRequest, HTTPURLResponse?, UIImage) -> Void)?, failure: (@MainActor @Sendable (URLRequest?, HTTPURLResponse?, Error) -> Void)?, progress: (@MainActor @Sendable (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<T>( for object: T, imageURL: Any?, options: WebImageOptions, context: [ImageCoderOptions: Any]?, placeholder: (@MainActor @Sendable () -> Void)?, completion: (@MainActor @Sendable (UIImage?, Bool, Error?) -> Void)?, progress: (@MainActor @Sendable (Double) -> Void)? ) where T: Sendable
-
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: (@MainActor @Sendable () -> Void)? = nil)