我發現了罪魁禍首。我添加了一些代碼,以便在Safari中打開外部鏈接。所以這是這個代碼MainViewController.m:
// BEGIN - Custom code
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
NSURL *requestURL =[ request URL ];
if (([ [ requestURL scheme ] isEqualToString: @"http" ] || [ [ requestURL scheme ] isEqualToString: @"https" ] || [ [ requestURL scheme ] isEqualToString: @"mailto" ]))
{
[[UIApplication sharedApplication] openURL: requestURL];
return NO;
}
return YES;
}
// END - Custom code
取而代之的return YES;
末,我曾與取代它:
return [super webView:webView shouldStartLoadWithRequest:request navigationType:navigationType];
和一切工作!
哦,它也在iPad上。那肯定是我改變的東西。 – SsjCosty