iOS - Caching and loading images asynchronously

后端 未结 3 444
醉酒成梦
醉酒成梦 2020-12-12 12:34

I want an image loading and caching library for iOS that

  • loads images asynchronously,
  • caches images, with a configurable cache size and LRU behaviour,
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-12 13:07

    I know that this thread has been answered, but I have tried a library that has worked great. I was using ASIHttpRequest before and the difference is big.

    https://github.com/rs/SDWebImage

    Also, if someone needs to Resize or Crop the remote images, and have the same features that SDWebImage provide, I have integrated SDWebImage library with UIImage+Resize library (by Trevor Harmon), and created an example project. I modified the code of SDWebImage to deal with transformations (crop, resize).

    The project is public on https://github.com/toptierlabs/ImageCacheResize. Feel free to use it!

提交回复
热议问题