
Untitled
By: a guest on
May 31st, 2012 | syntax:
None | size: 0.74 KB | hits: 50 | expires: Never
- (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
NSURLRequest* req = request;
if ([[[request URL] absoluteString] isEqualToString: @"about:blank"]) {
NSLog(@"Rewriting about:blank");
NSString* app = [[NSBundle mainBundle] resourcePath];
NSString* blankpath = [NSString stringWithFormat: @"%@/www/blank.html", app];
NSURL* blankurl = [NSURL fileURLWithPath:blankpath];
req = [NSURLRequest requestWithURL: blankurl];
}
return [ super webView:theWebView shouldStartLoadWithRequest:req navigationType:navigationType ];
}