@@ -70,24 +70,32 @@ - (void)cancelCurrentImageLoad
70
70
71
71
- (void )webImageManager : (SDWebImageManager *)imageManager didProgressWithPartialImage : (UIImage *)image forURL : (NSURL *)url
72
72
{
73
- CATransition *animation = [CATransition animation ];
74
- animation.duration = WWS_DEFAULT_IMAGE_FADE_DURATION;
75
- animation.type = kCATransitionFade ;
76
- [animation setRemovedOnCompletion: TRUE ];
77
- [[self layer ] addAnimation: animation forKey: @" setImage" ];
78
- [self setImage: image];
73
+
74
+
75
+ if (!(image.size .width == 1.0 && image.size .height == 1.0 )) {
76
+ CATransition *animation = [CATransition animation ];
77
+ animation.duration = WWS_DEFAULT_IMAGE_FADE_DURATION;
78
+ animation.type = kCATransitionFade ;
79
+ [animation setRemovedOnCompletion: TRUE ];
80
+ [[self layer ] addAnimation: animation forKey: @" setImage" ];
81
+ [self setImage: image];
82
+ }
83
+
84
+
79
85
}
80
86
81
87
- (void )webImageManager : (SDWebImageManager *)imageManager didFinishWithImage : (UIImage *)image
82
88
{
83
89
84
- CATransition *animation = [CATransition animation ];
85
- animation.duration = WWS_DEFAULT_IMAGE_FADE_DURATION;
86
- animation.type = kCATransitionFade ;
87
- [animation setRemovedOnCompletion: TRUE ];
88
- [[self layer ] addAnimation: animation forKey: @" setImage" ];
89
- [self setImage: image];
90
90
91
+ if (!(image.size .width == 1.0 && image.size .height == 1.0 )) {
92
+ CATransition *animation = [CATransition animation ];
93
+ animation.duration = WWS_DEFAULT_IMAGE_FADE_DURATION;
94
+ animation.type = kCATransitionFade ;
95
+ [animation setRemovedOnCompletion: TRUE ];
96
+ [[self layer ] addAnimation: animation forKey: @" setImage" ];
97
+ [self setImage: image];
98
+ }
91
99
}
92
100
93
101
@end
0 commit comments