1

uiwebview 由于缓存而崩溃,我该如何删除 UIwebview 缓存?请如果有人知道,请帮忙

- (void)webViewDidFinishLoad:(UIWebView *)webView {
headingLabel.text= @"Crop Browser";
spinner.hidden= true;
webview.hidden= false;
closeButton.hidden=YES;

NSURLCache *sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:0 diskCapacity:0 diskPath:nil];
[NSURLCache setSharedURLCache:sharedCache];
[sharedCache release];
sharedCache = nil;
// remove all cached responses
[[NSURLCache sharedURLCache] removeAllCachedResponses];

// set an empty cache


NSLog(@"webfinish");
if(cropButton.tag!=1)   //1 would mean the crop button is hidden manually (user pressed crop button)
    cropButton.hidden= false;
}
4

0 回答 0