0

我已经正确实现并安装了框架,这花了我几天时间,而且我也是新手,问题是我有这些来自网络的图像,所以我解析了它,然后想使用 SDImageView 加载这些图像,但是在编译后我有这个例外

-[UIImageView setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x75b9730
[2456:11303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x75b9730'

当我删除占位符值时,出现此异常

-[UIImageView setImageWithURL:]: unrecognized selector sent to instance 0x7555960
[2236:11303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageWithURL:]: unrecognized selector sent to instance 0x7555960'

我的代码也是这样的:

NSString *imageLink = [currentData imageLinkFromWeb];
[cell.imageView setImageWithURL:[NSURL URLWithString:imageLink]  placeholderImage:[UIImage imageNamed:@"image.jpg"]];
4

1 回答 1

0

我也遇到了这个。对我来说,这是由于没有在构建设置中添加 -ObjC 链接器标志造成的。添加标志的说明在这里。祝你好运!

于 2015-03-04T16:03:21.823 回答