MWPhotoBrowser icon indicating copy to clipboard operation
MWPhotoBrowser copied to clipboard

SDWebImage error

Open buoooou opened this issue 7 years ago • 6 comments

/MWPhotoBrowser/MWPhotoBrowser/Classes/MWPhoto.m:162:63: Incompatible block pointer types sending 'void (^)(NSUInteger, long long)' to parameter of type 'SDWebImageDownloaderProgressBlock' (aka 'void (^)(NSInteger, NSInteger)')

buoooou avatar Mar 02 '17 15:03 buoooou

solved? how?

ZhangComer avatar Mar 20 '17 02:03 ZhangComer

my project imports MWPhotoBrowser,has error.solved by changing block pointer types "void (^)(NSUInteger, long long)" to "void (^)(NSInteger, NSInteger)".

buoooou avatar Mar 20 '17 15:03 buoooou

my english is poor ,hope u could understood what i say

buoooou avatar Mar 20 '17 15:03 buoooou

Thank you. Totally understand.

ZhangComer avatar Mar 21 '17 02:03 ZhangComer

See MediaBrowser I made this library to Swift3 using latest SDWebImage

younatics avatar Sep 10 '17 02:09 younatics

@zhangkuo921112 I Sove it,

typedef void(^SDWebImageDownloaderProgressBlock)(NSInteger receivedSize, NSInteger expectedSize);


#pragma mark - progress block参数类型不对导致报错
                _webImageOperation = [manager downloadWithURL:_photoURL
                                                      options:0
                                                     progress:^(NSInteger receivedSize,NSInteger expectedSize) {
                                                         if (expectedSize > 0) {
                                                             float progress = receivedSize / (float)expectedSize;
                                                             NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
                                                                                   [NSNumber numberWithFloat:progress], @"progress",
                                                                                   self, @"photo", nil];
                                                             [[NSNotificationCenter defaultCenter] postNotificationName:MWPHOTO_PROGRESS_NOTIFICATION object:dict];
                                                         }
                                                     }
                                                    completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished) {
                                                        if (error) {
                                                            MWLog(@"SDWebImage failed to download image: %@", error);
                                                        }
                                                        _webImageOperation = nil;
                                                        self.underlyingImage = image;
                                                        [self decompressImageAndFinishLoading];
                                                    }];


kb100824 avatar Oct 16 '17 07:10 kb100824