Senthil Raja Ramasamy
Senthil Raja Ramasamy

Reputation: 111

Using SDWebImage to iphone

I am using SDWebImage for my app.

I downloaded ASWebImage files from this link

Added into myapp. Then i Imported UIImageView+WebCache.h

When i run my app i am getting exception.

here is my code

self.view.backgroundColor = [UIColor whiteColor];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]
[imageView setImageWithURL:[NSURL URLWithString:@"http://mydomain.com/a.jpg"]];
[self.view addSubview:imageView];
[imageView release];

When i run this app i am getting following exception.

[UIImageView setImageWithURL:]: unrecognized selector sent to instance 0x6e64390
2012-08-23 19:32:14.828 test123[16941:f803] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImageView setImageWithURL:]: unrecognized selector sent to instance 0x6e64390'

Upvotes: 1

Views: 2801

Answers (3)

Scott D
Scott D

Reputation: 1424

In order to resolve this issue, please refer to the project installation instructions. I had the same error, however as soon as I followed the installation instructions, the issue was resolved immediately.

You can find those instructions here: https://github.com/rs/SDWebImage#installation

Upvotes: 2

MhammedMohie
MhammedMohie

Reputation: 312

make sure you have imported "ImageIO.framework"

Upvotes: 2

ikuramedia
ikuramedia

Reputation: 6058

Have you linked the SDWebImage library with your app? How about the linker flag -ObjC?

Upvotes: 0

Related Questions