Async image downloader

前端 未结 5 1283
北海茫月
北海茫月 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 12:06

    Simply follow the steps:

        1) Download SDWebImage below  And drag to your xcode project. 
    

    Click here to Download the SDWebImage

       2) Write the following code in your .h file #import "UIImageView+WebCache.h"
       3) Write the following code for your image view 
      [yourImageView setImageWithURL:[NSURL URLWithString:@"www.sample.com/image.png"]];
    

    Thats its... you have done!!!

提交回复
热议问题