I'm new at Xcode, and my task was to migrate the code from iOS 6.1 to 8.4, but there where so many deprecated methods. I solved them (I hope so), but now I got a new problem.
The code I'm using is this one:
[self.clientImageView sd_setImageWithURL:[NSURL URLWithString:_client.imageURL] placeholderImage:[UIImage imageNamed:@"placeholder.png"]];
And I get this error:
[UIImageView sd_setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x7fbe937a88b0
And finally, I get this:
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView sd_setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x7fbe937a88b0'
Thank you so much.
By the Collaborator ofSDWebImage
See https://github.com/rs/SDWebImage#add-linker-flag. Correctly
setting the flags should take care of the issue. BTW: I strongly
recommend you guys switch to CocoaPods, that way those issues will
never arise.
If you imported the framework and set up all of the right flags, try to delete the contents of this folder ~/Library/Developer/Xcode/DerivedData
and fun a clean build. It should help.
Just add -ObjC in other linker flags and added sdwebcache.a in link libraries
Copy and paste all files from the library in your project. I tried everything suggested and nothing worked. At the end, simple copy paste do the work.
Also, I must say that I didn't have this problem on the new project, just in existing one. On the new project everything worked just fine.