我在实现 AFNetworking 3.0 图像加载方法时遇到了一点麻烦。这就是我尝试使用它的方式。谁能告诉我我做错了什么?
[self.imageView setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.imageURL]] placeholderImage:nil success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image){
self.imageView.image = image;
}
failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error) {
NSLog(@"Unable to retrieve image");
}];
它给了我编译时错误,即:
'UIImageView' 没有可见的@interface 声明选择器'setImageWithURLRequest:placeHolder:success:failure