Ios 收到的SDWebImage图像大小为空
我试图用SDWebImage显示进度视图,但当我尝试下面的代码时,它在receivedSize中返回0Ios 收到的SDWebImage图像大小为空,ios,objective-c,sdwebimage,Ios,Objective C,Sdwebimage,我试图用SDWebImage显示进度视图,但当我尝试下面的代码时,它在receivedSize中返回0 [cell. ImageHotDish setImageWithURL:[NSURL URLWithString:picName] placeholderImage:[UIImage imageNamed:nil] options:0 progress:^(NSUInteger receivedSize, long long expectedSize) {
[cell. ImageHotDish setImageWithURL:[NSURL URLWithString:picName]
placeholderImage:[UIImage imageNamed:nil]
options:0 progress:^(NSUInteger receivedSize, long long expectedSize) {
NSLog(@"Downloaded = %@",receivedSize);
} completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType) {
[cell.ImageHotDish setImageWithURL:[NSURL URLWithString:picName]];
}];
我收到的尺寸是空的
[cell. ImageHotDish setImageWithURL:[NSURL URLWithString:picName]
placeholderImage:[UIImage imageNamed:nil]
options:0 progress:^(NSUInteger receivedSize, long long expectedSize) {
NSLog(@"Downloaded = %@",receivedSize);
} completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType) {
[cell.ImageHotDish setImageWithURL:[NSURL URLWithString:picName]];
}];
谁能告诉我哪里做错了
我已经检查了这个解决方案,但它没有显示进度,只是一个活动指示器。我想得到的是下载了多少图片
是否加载图像?@manujmv Yes图像加载成功是否接收到大小始终显示为0?@manujmv Yes,始终显示大小0为什么要在完成块中再次设置图像?