When call setImageWithURL, it fails with following,
[UIImageView setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x149a20 2011-12-14 18:11:38.060 [781:707] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x149a20'
I can confirm I have included SDWebImage
project and required headers correctly as I can use the SDWebImageManager successfully.
Following is the code where I called the UIImageView category method setImageWithURL
NSURL* url = [NSURL URLWithString:@"www.abc.com/abc.png"];
[cell.imageView setImageWithURL:url placeholderImage:[UIImage imageNamed:@"abc.png"]];
As per: linking objective-c categories in a static library
Due to a linker bug in XCode, you need to set the 'Other Linker Flags' setting your build target. Setting the flag as follows should eliminate this error.
-force_load ${BUILT_PRODUCTS_DIR}/libSDWebImage.a
This will solve the problem: Open the "Build Settings" tab, in the "Linking" section, locate the "Other Linker Flags" setting and add the "-ObjC" flag:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With