我正在尝试使用SDWebImage框架来异步加载和缓存映像。我可以将SDWebImage项目集成到我的项目中,并成功地构建。但我不能使用这行代码
[pCell.imgViewThumb sd_setImageWithURL:[NSURL URLWithString:aPromo.picture_url_thumb] placeholderImage:[UIImage imageNamed:@"Placeholder.png"]];它给出了这个错误
No visible @interface for 'UIImageView' declares the selector 'sd_setImageWithURL:placeholderImage:'但是sd_setImageWithURL:方法和类已经添加到项目中了。我试过几次清理这个项目,重新链接框架等等.但没起作用


发布于 2015-03-16 09:29:08
我安装了最新的'SDWebImage‘pod文件,使用这个pod 'SDWebImage','~>3.7.1’问题修复
发布于 2015-03-12 15:25:32
您需要导入该类别。类型
#import <SDWebImage/UIImageView+WebCache.h>在文件上面。
发布于 2015-03-12 15:27:07
您需要导入SDWebImage类别文件吗?我相信它叫做UIImageView+WebCache.h。代码看起来类似于(在您的文件顶部有其他导入):
#import <SDWebImage/UIImageView+WebCache.h>https://stackoverflow.com/questions/29013725
复制相似问题