NSData dataWithContentsOfURL

Posted by ketan rajput on Stack Overflow See other posts from Stack Overflow or by ketan rajput
Published on 2011-03-14T07:50:54Z Indexed on 2011/03/14 8:10 UTC
Read the original article Hit count: 260

Filed under:
|
|
|

I have this method for button click (download). The problem is that it is terminating due to an exception:

[Session started at 2011-03-14 13:06:45 +0530.]
2011-03-14 13:06:45.710 XML[7079:20b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '*** -[NSCFString isFileURL]: unrecognized selector sent to instance 0x62b8'
-(IBAction) download
{
    UIImage *image = [UIImage imageWithData: [NSData dataWithContentsOfURL:@"http://ws.cdyne.com/WeatherWS/Images/thunderstorms.gif"]];
    [image release];
}

What is the problem?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uiimage