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