Вы можете использовать GCD для загрузки изображений в фоновом потоке, например:
//get a dispatch queue
dispatch_queue_t concurrentQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
//this will start the image loading in bg
dispatch_async(concurrentQueue, ^{
NSData *image = [[NSData alloc] initWithContentsOfURL:imageURL];
//this will set the image when loading is finished
dispatch_async(dispatch_get_main_queue(), ^{
imageView.image = [UIImage imageWithData:image];
});
});
Привет. Но вам, вероятно, нужно добавить dispatch_release (concurrentQueue); безусловно, нет утечки. - Франк 25 августа в 19: 43