网络请求异步

    NSString *url_string = @"http://b33.photo.store.qq.com/psu?/05ded9dc-1001-4be2-b975-13e05bbe8a74/YQttQ6aq57DdFXI99mxZ1KO.MbUmc5tp7ltg8Vi1E4A!/b/YQEyvBMZvgAAYvh1zgrXSAAA&a=33&b=18&bo=4AGAAgAAAAABAEQ!&rf=photoDetail/psu.jpeg";

    //1.构造网络地址

    NSURL *url = [NSURL URLWithString:url_string];

    //2.构造网络请求

    NSURLRequest *request = [NSURLRequestrequestWithURL:url];

    //3.使用网络连接对象发送网络请求对象

    [NSURLConnectionsendAsynchronousRequest:request queue:[NSOperationQueuemainQueue]

     completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {

           UIImage *image = [[UIImage alloc] initWithData:data];

           //图片的大小

           self.imageView.contentMode = UIViewContentModeRedraw;

           self.imageView.image = image;

     }];

原文地址:https://www.cnblogs.com/zhucunliang/p/3466266.html