I need UIWebView to display some local .webarchive file. But images there have same names, so UIWebView shows only one image all the time. How can I clear the cache?
Use following code:
NSString *cacheDir=[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0]; [[NSFileManager defaultManager]removeItemAtPath:cacheDir error:nil];