for (int i = 0; i < self.page; i++) {
dispatch_async(dispatch_get_global_queue(0, 0), ^{
// 处理耗时操作
NSString *imageUrl = [self.imageArray objectAtIndex:i];
NSURL *url = [NSURL URLWithString:imageUrl];
UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:url]];
//通知主线程刷新
dispatch_async(dispatch_get_main_queue(), ^{
//回调或者说是通知主线程刷新,
[[self.imageViewArray objectAtIndex:i] setImage:image];
});
});
}