标签:
dispatch_queue_t querue= dispatch_get_main_queue();
dispatch_queue_t querue2= dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT , 0);
dispatch_async(querue2, ^{
NSURL *url=[NSURL URLWithString:@"http://c.hiphotos.baidu.com/image/pic/item/cc11728b4710b912aa84a0bfc0fdfc039245222d.jpg"];
NSData *data=[NSData dataWithContentsOfURL:url];
UIImage *image=[UIImage imageWithData:data];
dispatch_async(querue, ^{
self.imageview.image=image;
});
});
标签:
原文地址:http://www.cnblogs.com/zhibin/p/4242787.html