iOS开发之清除缓存

NSFileManager *mgr = [NSFileManager defaultManager];

NSString *cachePath =

[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject];

[mgr removeItemAtPath:cachePath error:nil];

你可能感兴趣的:(iOS开发之清除缓存)