Просмотр исходного кода

made downloadImage method open instead of internal

Sean Roehnelt 6 лет назад
Родитель
Сommit
12a3efba1e
1 измененных файлов с 10 добавлено и 2 удалено
  1. 10 2
      Sources/Networking/ImageDownloader.swift

+ 10 - 2
Sources/Networking/ImageDownloader.swift

@@ -193,8 +193,17 @@ open class ImageDownloader {
         }
         }
     }
     }
 
 
+    // MARK: Dowloading Task
+    /// Downloads an image with a URL and option. Invoked internally by Kingfisher. Subclasses must invoke super.
+    ///
+    /// - Parameters:
+    ///   - url: Target URL.
+    ///   - options: The options could control download behavior. See `KingfisherOptionsInfo`.
+    ///   - completionHandler: Called when the download progress finishes. This block will be called in the queue
+    ///                        defined in `.callbackQueue` in `options` parameter.
+    /// - Returns: A downloading task. You could call `cancel` on it to stop the download task.
     @discardableResult
     @discardableResult
-    func downloadImage(
+    open func downloadImage(
         with url: URL,
         with url: URL,
         options: KingfisherParsedOptionsInfo,
         options: KingfisherParsedOptionsInfo,
         completionHandler: ((Result<ImageLoadingResult, KingfisherError>) -> Void)? = nil) -> DownloadTask?
         completionHandler: ((Result<ImageLoadingResult, KingfisherError>) -> Void)? = nil) -> DownloadTask?
@@ -312,7 +321,6 @@ open class ImageDownloader {
         return downloadTask
         return downloadTask
     }
     }
 
 
-    // MARK: Dowloading Task
     /// Downloads an image with a URL and option.
     /// Downloads an image with a URL and option.
     ///
     ///
     /// - Parameters:
     /// - Parameters: