Async image downloader

前端 未结 5 1231
北海茫月
北海茫月 2021-02-01 11:37

I have write a little class to perform the download of the images by using an NSURLConnection. The idea it\'s to delegate the download to this class to avoid to block the execu

5条回答
  •  野性不改
    2021-02-01 11:58

    NSAutoreleasePool *pool=[[NSAutoreleasePool alloc]init];
        [img_data setImage:[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:self.str_url]]]];
        [pool release];
    

提交回复
热议问题