SDWebImage清理缓存及其使用问题
来源:互联网 发布:centos 7 官网下载 编辑:程序博客网 时间:2024/05/18 12:04
github地址 : https://github.com/rs/SDWebImage
demo写的清楚缓存按钮方法 ( 使用了 alertController )
float cache = [[SDImageCache sharedImageCache] getSize] / 1024.0 / 1024.0; NSString *clearCacheName = cache >= 1 ? [NSString stringWithFormat:@"清理缓存(%.2fM)",cache] : [NSString stringWithFormat:@"清理缓存(%.2fK)",cache * 1024]; UIAlertController *alertC = [UIAlertController alertControllerWithTitle:@"提示" message:clearCacheName preferredStyle:(UIAlertControllerStyleAlert)]; UIAlertAction *cleanAction = [UIAlertAction actionWithTitle:@"清理" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { [[SDImageCache sharedImageCache] clearDisk]; UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"提示" message:@"缓存清理完成" delegate:self cancelButtonTitle:@"确定" otherButtonTitles:nil, nil]; [alertView show]; }]; [alertC addAction:cancelAction]; [alertC addAction:cleanAction]; [self presentViewController:alertC animated:YES completion:nil];
若有不解 请看:
最新版 SDWebImage:http://www.cocoachina.com/ios/20141212/10622.html
清理缓存方面:http://www.open-open.com/lib/view/open1425625126743.html
http://blog.csdn.net/heartofthesea/article/details/14127749
0 0
- SDWebImage清理缓存及其使用问题
- SDWebImage使用以及缓存和本地存储的清理
- SDWebImage 缓存策略以及缓存清理
- SDWebImage/SDImageCache 获得缓存大小,清理缓存。
- 关于SDWebImage缓存问题
- 使用SDWebImage下载缓存
- 使用SDWebimage 缓存图片
- sdwebimage缓存图片对比问题
- 关于清理缓存问题
- 清理项目缓存问题
- 使用SDWebImage清除图片缓存
- 使用SDWebImage 清除App 缓存
- SDWebImage异步加载图片及缓存的管理与清理
- SDWebImage异步加载图片及缓存的管理与清理
- SDWebImage异步加载图片及缓存的管理与清理
- SDWebImage异步加载图片及缓存的管理与清理
- SDWebImage异步加载图片及缓存的管理与清理
- iOS利用SDWebImage实现缓存的计算与清理
- Fragment对象的使用(一)
- Android键盘“enter”键设置为“下一项”失效解决办法
- DIV CSS display (block none inline)属性的用法教程
- asn1学习笔记
- 宏函数
- SDWebImage清理缓存及其使用问题
- Android 图片滑动效果: ViewPager
- [TwistedFate]滑块UISlider 跑图UIImageView
- HDU 1290:献给杭电五十周年校庆的礼物【数学】
- css教程之列表属性
- Button控件实现发送验证码倒计时方法
- 文章列表中文章标题过长的做法
- WIFI基本知识整理
- CSS list-style修改列表属性控制li标签样式