SDWebImage Download image and store to cache for key

后端 未结 11 1516
失恋的感觉
失恋的感觉 2020-12-24 03:30

Hello I am using the SDWebImage framework in a project and I want to download and cache images, but I think my code is storing an image in the cache twice? Is there any way

11条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-24 04:00

    SDWebImageManager *manager = [SDWebImageManager sharedManager];
    
    [manager downloadImageWithURL:ImageUrl options:0 progress:^(NSInteger receivedSize, NSInteger expectedSize)
    
    {
    
    
    } completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
    
        if(image){
    
    
            NSLog(@"image=====%@",image);
        }
    }];
    

提交回复
热议问题