私はUIImageViewを持っています。この imageView の画像は Web から読み込まれます。ロードを停止する方法を誰か教えてください。
これは私のコードです:
UIImageView *currentImgView = (UIImageView *)[self.scrollView viewWithTag:self.pageControl.currentPage + 500];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
UIImage *newImg = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[[[self.imagesStructure valueForKey:DATA_PARAMETER] objectAtIndex:self.pageControl.currentPage] valueForKey:@"source"]]]];
dispatch_async(dispatch_get_main_queue(), ^{
currentImgView.image = newImg;
[self hideActivityView];
});
});