Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 收到的SDWebImage图像大小为空_Ios_Objective C_Sdwebimage - Fatal编程技术网

Ios 收到的SDWebImage图像大小为空

Ios 收到的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) {

我试图用SDWebImage显示进度视图,但当我尝试下面的代码时,它在receivedSize中返回0

[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为什么要在完成块中再次设置图像?