【发布时间】:2015-07-27 07:26:07
【问题描述】:
我已经通过各种解决方案来清除 UIWebView 中的本地图像缓存,当我尝试在 html 中加载图像时,它会自动显示上一个图像(我使用相同的名称替换模板中的图像)。
[[NSURLCache sharedURLCache] removeAllCachedResponses];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL:[NSURL fileURLWithPath:[[CustomFunctions getFilesPath] stringByAppendingPathComponent:obj]] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[webview1 loadRequest:request];
[webview1 reload];
这是我的代码,任何人都可以建议我这样做。提前致谢。对不起我的英语。
【问题讨论】:
标签: ios uiwebview nsurlrequest nsurlcache