Updated bitwise operator to correctly find option if more than 1 are included
This commit is contained in:
parent
f7ee9d3375
commit
7ca81d0e36
|
|
@ -41,7 +41,7 @@ static char operationArrayKey;
|
|||
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock {
|
||||
[self cancelCurrentImageLoad];
|
||||
|
||||
if (options != SDWebImageDelayPlaceholder) {
|
||||
if (!(options & SDWebImageDelayPlaceholder)) {
|
||||
self.image = placeholder;
|
||||
}
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ static char operationArrayKey;
|
|||
wself.image = image;
|
||||
[wself setNeedsLayout];
|
||||
} else {
|
||||
if (options == SDWebImageDelayPlaceholder) {
|
||||
if (options & SDWebImageDelayPlaceholder) {
|
||||
wself.image = placeholder;
|
||||
[wself setNeedsLayout];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue