Hi guys,
I'm trying to load a UIImage from an URL with the following code:[html]
Code:
NSString path = @"http://www.wannerbrothers.net/images/header.png";
NSURL *url = [NSURL URLWithString:path];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *img = [[UIImage alloc] initWithData:data];
For some reason, this crashes. But only in specific files. When I create a new view controller, it works, but as soon as I change some other things, it crashes.
As if this weren't strange enough, it works fine approximately every fifth attempt. What could be the problem? Btw, the app crashes due to a SIGABRT.
Thanks in advance!