Download image asynchronously

后端 未结 8 921
滥情空心
滥情空心 2020-12-03 19:46

I need to download an image from the web and display it in an ImageView. Presently I am using SDWebImage (It is an asynchronous image downloader wi

8条回答
  •  情书的邮戳
    2020-12-03 20:40

    Yes. You can user other libary. I've already implemented that using AsyncImageView which is inherited from UIImageView. What it does is it stores images in Cache memory fetched from a url and whenever you need to load image from the same URL again it will simply load it from the cache memory saving a lot of time.

    Just follow the link for implementing that:

    https://github.com/nicklockwood/AsyncImageView#readme

    http://www.markj.net/iphone-asynchronous-table-image/

    Please have a look at the image showing the technique I've implemented. It lets you do other activity while images are loading.:

    enter image description here

提交回复
热议问题