SDWebImage sending unknown exception

2019-08-21 06:05发布

i have implemented and installed the framework correctly which it took me days, and also im new to this, the thing is i have this images from the web so i parsed it and then want to load those images using SDImageView, but after compiling im having this exception

-[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'

when i remove the placeholder value this exception appear

-[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'

my code also goes like this:

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

1条回答
贪生不怕死
2楼-- · 2019-08-21 06:43

I ran into this too. For me it was caused by not adding the -ObjC linker flag to the build settings. Instructions for adding the flag are here. Good luck!

查看更多
登录 后发表回答