Explorar o código

Merge branch 'master' into test-hound

onevcat %!s(int64=10) %!d(string=hai) anos
pai
achega
f31b60bfc9

+ 2 - 0
.hound.yml

@@ -0,0 +1,2 @@
+swift:
+  enabled: true

+ 1 - 1
Kingfisher/ImageTransition.swift

@@ -27,7 +27,7 @@
 import UIKit
 
 /**
-Transition effect to use when an image loaded by `UIImageView` extension API in Kingfisher.
+Transition effect to use when an image downloaded and set by `UIImageView` extension API in Kingfisher.
 You can assign an enum value with transition duration as an item in `KingfisherOptionsInfo` 
 to enable the animation transition.
 

+ 1 - 1
Kingfisher/KingfisherOptionsInfo.swift

@@ -37,7 +37,7 @@ Item could be added into KingfisherOptionsInfo
 - Options:     Item for options. The value of this item should be a KingfisherOptions.
 - TargetCache: Item for target cache. The value of this item should be an ImageCache object. Kingfisher will use this cache when handling the related operation, including trying to retrieve the cached images and store the downloaded image to it.
 - Downloader:  Item for downloader to use. The value of this item should be an ImageDownloader object. Kingfisher will use this downloader to download the images.
-- Transition:  Item for animation transition when using UIImageView.
+- Transition:  Item for animation transition when using UIImageView. Kingfisher will use the `ImageTransition` of this enum to animate the image in if it is downloaded from web. The transition will not happen when the image is retrieved from either memory or disk cache.
 */
 public enum KingfisherOptionsInfoItem {
     case Options(KingfisherOptions)

+ 1 - 1
Kingfisher/UIImageView+Kingfisher.swift

@@ -202,7 +202,7 @@ public extension UIImageView {
                     if let sSelf = self where imageURL == sSelf.kf_webURL && image != nil {
                         
                         if let transitionItem = optionsInfo?.kf_findFirstMatch(.Transition(.None)),
-                            case .Transition(let transition) = transitionItem {
+                            case .Transition(let transition) = transitionItem where cacheType == .None {
                             
                             UIView.transitionWithView(sSelf, duration: 0.0, options: [],
                                 animations: {