Updated bitwise operator to correctly find option if more than 1 are included

This commit is contained in:
Bill Burgess 2014-04-29 10:13:28 -05:00
parent f7ee9d3375
commit 7ca81d0e36
1 changed files with 2 additions and 2 deletions

View File

@ -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];
}