According to the documentation, the code you wrote is invalid. UIKit objects cannot be called anywhere other than the main thread. I bet that what you do works in most cases, but does not change the display, while the screen is updated by coincidence for some other reason.
Apple , URL-, . NSURLConnection runloop . , NSData, , , , , ,
url = [NSURL URLWithString:theURLString];
NSData *data = [NSData dataWithContentsOfURL:url];
[self performSelectorOnMainThread:@selector(setImageViewImage:) withObject:data waitUntilDone:YES];
...
- (void)setImageViewImage:(NSData *)data
{
img = [[UIImage alloc] initWithData:data];
[imageView setImage:img];
[img release];
NSLog(@"Image reloaded");
}
performSelectorOnMainThread , - , , , . "" - , NSOperation. , , , waitUntilDone:YES. -, , .
, (, JPEG PNG), . , UIImage, , , C CoreGraphics. , .