2011-12-05 60 views

回答

1

你只需要添加這個在您的AppDelegate.m

- (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType 
{ 
    NSURL *url = [request URL]; 

    // Intercept the external http requests and forward to Safari.app 
    // Otherwise forward to the PhoneGap WebView 
    if ([[url scheme] isEqualToString:@"http"] || [[url scheme] isEqualToString:@"https"]) { 
     [[UIApplication sharedApplication] openURL:url]; 
     return NO; 
    } 
    else { 
     return [ super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType ]; 
    } 
} 

希望這有助於

+0

Childbrowser 2.0.1不具有AppDelegate.m。你知道如何讓它爲新版本工作嗎? – Deyang

相關問題