Skip to content

Commit 0e99f13

Browse files
committed
Merge pull request MengTo#82 from chenweiyj/master
async image to placeholder when it is nil
2 parents 84f5bea + 2446b65 commit 0e99f13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Spring/AsyncImageView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class AsyncImageView: UIImageView {
3434
if let strongSelf = self {
3535
dispatch_async(dispatch_get_main_queue(), { () -> Void in
3636
if strongSelf.url?.absoluteString == url {
37-
strongSelf.image = image
37+
strongSelf.image = image ?? strongSelf.placeholderImage
3838
}
3939
})
4040
}

0 commit comments

Comments
 (0)