Update UIImageView+WebCache.m
Can cause animation losing or crash if you are in a thread.
Showing
1 changed file
with
3 additions
and
1 deletions
@@ -43,7 +43,9 @@ static char imageURLKey; | @@ -43,7 +43,9 @@ static char imageURLKey; | ||
43 | objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC); | 43 | objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC); |
44 | 44 | ||
45 | if (!(options & SDWebImageDelayPlaceholder)) { | 45 | if (!(options & SDWebImageDelayPlaceholder)) { |
46 | - self.image = placeholder; | 46 | + dispatch_main_async_safe(^{ |
47 | + self.image = placeholder; | ||
48 | + }); | ||
47 | } | 49 | } |
48 | 50 | ||
49 | if (url) { | 51 | if (url) { |
-
Please register or login to post a comment