【发布时间】:2014-07-20 20:10:15
【问题描述】:
我需要等到setImageWithURL 完成图像处理,这是我在 viewDidLoad 方法上的代码:
UIImageView *test = [[UIImageView alloc] init];
[test setImageWithURL:[NSURL URLWithString:object.imageUrl]];
是否可以将此方法设置为同步运行?我已经尝试过 completed 块,但出于某种奇怪的原因,它永远不会被调用。
【问题讨论】:
-
该 api 包含此调用的几种变体,其中包括完成块。我想不出同步运行它的任何好处。 hackemist.com/SDWebImage/doc/Categories/…
-
永远不会调用已完成的块
标签: ios caching uiimageview uiimage sdwebimage