SDWebImage清理缓存及其使用问题
2015-11-17 19:21
417 查看
github地址 : https://github.com/rs/SDWebImage
demo写的清楚缓存按钮方法 ( 使用了 alertController )
若有不解 请看:
最新版 SDWebImage:/article/1225764.html
清理缓存方面:http://www.open-open.com/lib/view/open1425625126743.html
/article/2855938.html
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:/article/1225764.html
清理缓存方面:http://www.open-open.com/lib/view/open1425625126743.html
/article/2855938.html
相关文章推荐
- 高斯模糊的实现
- 宏函数
- 那些年我们考过的图书馆测试
- java_XML_Dom4j
- Parallel.ForEach() 并行循环
- DIV CSS display (block none inline)属性的用法教程
- Android键盘“enter”键设置为“下一项”失效解决办法
- CEO必读12篇首届总裁读书会北京举行
- PMI-ACP敏捷项目管理微课内容分享-敏捷宣言&角色(20151117 丁仿)
- 通过<a>超链接方式点击链接下载出现中文乱码错误
- UIControl的两个子类 -- UISegmentedControl UISlider
- GDAL编译(2.x与1.x版本通用)
- Excel冻结n行m列
- 共享不同系统版本打印机
- 如何完全删除Win7系统下用户配置文件
- C++模板
- android 自定义NotifiCation
- UI第六天::UIControl及其⼦类
- 《软件需求十步走》阅读笔记第一篇
- 10. 面向holder编程、自动轮询