فهرست منبع

Fix typo: placeHolder -> placeholder. 'placeholder' is a word so that it shouldn't be written in camelCase.

Signed-off-by: mrahmiao <mrahmiao@gmail.com>
mrahmiao 10 سال پیش
والد
کامیت
e1618b9442
2فایلهای تغییر یافته به همراه14 افزوده شده و 14 حذف شده
  1. 1 1
      Kingfisher-Demo/ViewController.swift
  2. 13 13
      Kingfisher/UIImageView+Kingfisher.swift

+ 1 - 1
Kingfisher-Demo/ViewController.swift

@@ -57,7 +57,7 @@ extension ViewController: UICollectionViewDataSource {
     
     
     override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
     override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
         let cell = collectionView.dequeueReusableCellWithReuseIdentifier("collectionViewCell", forIndexPath: indexPath) as! CollectionViewCell
         let cell = collectionView.dequeueReusableCellWithReuseIdentifier("collectionViewCell", forIndexPath: indexPath) as! CollectionViewCell
-        cell.cellImageView.kf_setImageWithURL(NSURL(string: "https://raw.githubusercontent.com/onevcat/Kingfisher/master/images/kingfisher-\(indexPath.row + 1).jpg")!, placeHolderImage: nil, options: KingfisherOptions.LowPriority, progressBlock: { (receivedSize, totalSize) -> () in
+        cell.cellImageView.kf_setImageWithURL(NSURL(string: "https://raw.githubusercontent.com/onevcat/Kingfisher/master/images/kingfisher-\(indexPath.row + 1).jpg")!, placeholderImage: nil, options: KingfisherOptions.LowPriority, progressBlock: { (receivedSize, totalSize) -> () in
             println("\(indexPath.row + 1): \(receivedSize)/\(totalSize)")
             println("\(indexPath.row + 1): \(receivedSize)/\(totalSize)")
         }) { (image, error, imageURL) -> () in
         }) { (image, error, imageURL) -> () in
             println("\(indexPath.row + 1): Finished")
             println("\(indexPath.row + 1): Finished")

+ 13 - 13
Kingfisher/UIImageView+Kingfisher.swift

@@ -42,62 +42,62 @@ public extension UIImageView {
     */
     */
     public func kf_setImageWithURL(URL: NSURL) -> RetrieveImageTask
     public func kf_setImageWithURL(URL: NSURL) -> RetrieveImageTask
     {
     {
-        return kf_setImageWithURL(URL, placeHolderImage: nil, options: KingfisherOptions.None, progressBlock: nil, completionHandler: nil)
+        return kf_setImageWithURL(URL, placeholderImage: nil, options: KingfisherOptions.None, progressBlock: nil, completionHandler: nil)
     }
     }
     
     
     /**
     /**
     Set an image with a URL and a place holder image.
     Set an image with a URL and a place holder image.
     
     
     :param: URL              The URL of image.
     :param: URL              The URL of image.
-    :param: placeHolderImage A placeholder image when retrieving the image at URL.
+    :param: placeholderImage A placeholder image when retrieving the image at URL.
     
     
     :returns: A task represents the retriving process.
     :returns: A task represents the retriving process.
     */
     */
     public func kf_setImageWithURL(URL: NSURL,
     public func kf_setImageWithURL(URL: NSURL,
-                      placeHolderImage: UIImage?) -> RetrieveImageTask
+                      placeholderImage: UIImage?) -> RetrieveImageTask
     {
     {
-        return kf_setImageWithURL(URL, placeHolderImage: placeHolderImage, options: KingfisherOptions.None, progressBlock: nil, completionHandler: nil)
+        return kf_setImageWithURL(URL, placeholderImage: placeholderImage, options: KingfisherOptions.None, progressBlock: nil, completionHandler: nil)
     }
     }
     
     
     /**
     /**
     Set an image with a URL, a place holder image and options.
     Set an image with a URL, a place holder image and options.
     
     
     :param: URL              The URL of image.
     :param: URL              The URL of image.
-    :param: placeHolderImage A placeholder image when retrieving the image at URL.
+    :param: placeholderImage A placeholder image when retrieving the image at URL.
     :param: options          Options which could control some behaviors. See `KingfisherOptions` for more.
     :param: options          Options which could control some behaviors. See `KingfisherOptions` for more.
     
     
     :returns: A task represents the retriving process.
     :returns: A task represents the retriving process.
     */
     */
     public func kf_setImageWithURL(URL: NSURL,
     public func kf_setImageWithURL(URL: NSURL,
-                      placeHolderImage: UIImage?,
+                      placeholderImage: UIImage?,
                                options: KingfisherOptions) -> RetrieveImageTask
                                options: KingfisherOptions) -> RetrieveImageTask
     {
     {
-        return kf_setImageWithURL(URL, placeHolderImage: placeHolderImage, options: options, progressBlock: nil, completionHandler: nil)
+        return kf_setImageWithURL(URL, placeholderImage: placeholderImage, options: options, progressBlock: nil, completionHandler: nil)
     }
     }
     
     
     /**
     /**
     Set an image with a URL, a place holder image, options and completion handler.
     Set an image with a URL, a place holder image, options and completion handler.
     
     
     :param: URL               The URL of image.
     :param: URL               The URL of image.
-    :param: placeHolderImage  A placeholder image when retrieving the image at URL.
+    :param: placeholderImage  A placeholder image when retrieving the image at URL.
     :param: options           Options which could control some behaviors. See `KingfisherOptions` for more.
     :param: options           Options which could control some behaviors. See `KingfisherOptions` for more.
     :param: completionHandler Called when the image retrieved and set.
     :param: completionHandler Called when the image retrieved and set.
     
     
     :returns: A task represents the retriving process.
     :returns: A task represents the retriving process.
     */
     */
     public func kf_setImageWithURL(URL: NSURL,
     public func kf_setImageWithURL(URL: NSURL,
-                      placeHolderImage: UIImage?,
+                      placeholderImage: UIImage?,
                                options: KingfisherOptions,
                                options: KingfisherOptions,
                      completionHandler: CompletionHandler?) -> RetrieveImageTask
                      completionHandler: CompletionHandler?) -> RetrieveImageTask
     {
     {
-        return kf_setImageWithURL(URL, placeHolderImage: placeHolderImage, options: options, progressBlock: nil, completionHandler: completionHandler)
+        return kf_setImageWithURL(URL, placeholderImage: placeholderImage, options: options, progressBlock: nil, completionHandler: completionHandler)
     }
     }
     
     
     /**
     /**
     Set an image with a URL, a place holder image, options, progress handler and completion handler.
     Set an image with a URL, a place holder image, options, progress handler and completion handler.
     
     
     :param: URL               The URL of image.
     :param: URL               The URL of image.
-    :param: placeHolderImage  A placeholder image when retrieving the image at URL.
+    :param: placeholderImage  A placeholder image when retrieving the image at URL.
     :param: options           Options which could control some behaviors. See `KingfisherOptions` for more.
     :param: options           Options which could control some behaviors. See `KingfisherOptions` for more.
     :param: progressBlock     Called when the image downloading progress gets updated.
     :param: progressBlock     Called when the image downloading progress gets updated.
     :param: completionHandler Called when the image retrieved and set.
     :param: completionHandler Called when the image retrieved and set.
@@ -105,12 +105,12 @@ public extension UIImageView {
     :returns: A task represents the retriving process.
     :returns: A task represents the retriving process.
     */
     */
     public func kf_setImageWithURL(URL: NSURL,
     public func kf_setImageWithURL(URL: NSURL,
-                      placeHolderImage: UIImage?,
+                      placeholderImage: UIImage?,
                                options: KingfisherOptions,
                                options: KingfisherOptions,
                          progressBlock: DownloadProgressBlock?,
                          progressBlock: DownloadProgressBlock?,
                      completionHandler: CompletionHandler?) -> RetrieveImageTask
                      completionHandler: CompletionHandler?) -> RetrieveImageTask
     {
     {
-        image = placeHolderImage
+        image = placeholderImage
         
         
         self.kf_setWebURL(URL)
         self.kf_setWebURL(URL)
         let task = KingfisherManager.sharedManager.retrieveImageWithURL(URL, options: options, progressBlock: { (recivedSize, totalSize) -> () in
         let task = KingfisherManager.sharedManager.retrieveImageWithURL(URL, options: options, progressBlock: { (recivedSize, totalSize) -> () in