SDWebImage process images before caching

后端 未结 4 629
一生所求
一生所求 2020-12-13 11:18

I fetch a lot of images from the web, and they are all kind of sizes - they can be big, small etc..

So I can resize them when I display them in the cell but this is

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-13 12:07

    SDWebImage developer Olivier Poitrey answered this question for me here.

    You have to implement the SDWebImageManagerDelegate protocol and then set it as the shared manager's delegate like this:

    SDWebImageManager.sharedManager.delegate = self;
    
    using the imageManager:transformDownloadedImage:withURL: instance method.
    

    More information.

    Worked perfectly for me.

提交回复
热议问题