Reputation: 4550
I am trying to use SDWebImage framework for asynchronous loading and caching images. I could integrate SDWebImage project in to my project and build successfully. But I cannot use this line of code
[pCell.imgViewThumb sd_setImageWithURL:[NSURL URLWithString:aPromo.picture_url_thumb] placeholderImage:[UIImage imageNamed:@"Placeholder.png"]];
It gives this error
No visible @interface for 'UIImageView' declares the selector 'sd_setImageWithURL:placeholderImage:'
But the sd_setImageWithURL: method and the class already added in the project. I tried several times cleaning the project, re-linking the frameworks etc... But didn't work
Upvotes: 0
Views: 370
Reputation: 4550
I installed the latest 'SDWebImage' pod file using this pod 'SDWebImage', '~>3.7.1' Issue fixed
Upvotes: 1
Reputation: 72
Do you need to import the SDWebImage category file? I believe it is called UIImageView+WebCache.h. The code would look like (at the top of your file with the other imports):
#import <SDWebImage/UIImageView+WebCache.h>
Upvotes: 0
Reputation: 20284
You need to import the category. Type
#import <SDWebImage/UIImageView+WebCache.h>
on top of the file.
Upvotes: 0