• SDWebImage获取和清除缓存大小


    #pragma mark ---获取缓存的大小 ---
    - (void) getSizeCache{
        CGFloat size = [SDImageCache sharedImageCache].getSize / 1000.0 /1000;
        [self.cancelCacheButton setTitle:[NSString stringWithFormat:@"    缓存大小为:%.2fMB", size] forState:UIControlStateNormal];
    }
    
    #warning mark --- 点击清除缓存实现的方法 ---
    - (IBAction)cancelCache:(id)sender {
        [[SDImageCache sharedImageCache] clearDisk];
        [self.cancelCacheButton setTitle:@"    缓存大小为:0.00MB" forState:UIControlStateNormal];
    }
  • 相关阅读:
    stl-序列式容器
    BFS
    Hash
    二分法
    草稿1
    红黑树的左旋、右旋和颜色变换
    动态规划
    自动驾驶-安全
    二叉树

  • 原文地址:https://www.cnblogs.com/arenouba/p/5429712.html
Copyright © 2020-2023  润新知