zoukankan      html  css  js  c++  java
  • 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];
    }
  • 相关阅读:
    Milk Patterns POJ
    Musical Theme POJ
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    runloop
    OC -网络请求
  • 原文地址:https://www.cnblogs.com/arenouba/p/5429712.html
Copyright © 2011-2022 走看看