iOS 清除缓存
来源:互联网 发布:redshift渲染器mac 编辑:程序博客网 时间:2024/06/05 17:31
//清除缓存
- (void)clear
{
dispatch_async(
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0)
, ^{
NSString *cachPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory,NSUserDomainMask,YES) objectAtIndex:0];
NSArray *files = [[NSFileManagerdefaultManager] subpathsAtPath:cachPath];
// NSLog(@"files :%d",[files count]);
for (NSString *pin files) {
NSError *error;
NSString *path = [cachPathstringByAppendingPathComponent:p];
if ([[NSFileManagerdefaultManager] fileExistsAtPath:path]) {
[[NSFileManagerdefaultManager] removeItemAtPath:patherror:&error];
}
}
[self performSelectorOnMainThread:@selector(clearCacheSuccess)withObject:nilwaitUntilDone:YES];});
}
-(void)clearCacheSuccess
{
NSLog(@"清除缓存");
}
- ios webview清除缓存。
- ios webview清除缓存
- iOS开发清除缓存
- ios webview清除缓存
- ios webview清除缓存
- ios webview清除缓存
- IOS清除缓存
- iOS清除缓存
- 清除ios的缓存
- iOS 清除缓存
- iOS 清除缓存
- iOS 清除缓存
- iOS清除缓存
- iOS清除缓存
- iOS 清除缓存
- iOS 清除缓存
- iOS ---清除缓存
- ios清除缓存2
- libusb-win32 连续调用 usb_find_busses
- ASCII、Unicode、GBK和UTF-8字符编码的区别联系
- Android简单自定义圆形和水平ProgressBar的样式
- jQueryEasyUI Form中参数包含submit与否的差异
- Unity3d 异常处理- (二)
- iOS 清除缓存
- Java:Java中的同一性和等同性
- MySql:增删改查(CRUD)以及乱码编码解决(2)
- vc 使用CFileDialog打开或保存文件
- Scala教程(十三)Set、Map操作实战
- 【UGUI】美术字体的制作与使用
- android.os.NetworkOnMainThreadException
- 最全行车记录仪方案+主控芯片介绍!
- 原型的一个知识点