0
我试图阻止弹出窗口,但我看到的是,委托方法读取URL是从原来的网址不同:原:http://ti.me/1ifSRHg
在那里我看到:ti.me
的UIWebView阻止弹出窗口,也阻断了原来的网站
//块弹出窗口
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
NSString *host = [request.URL host];
NSLog(@"host:%@",host); // host:ti.me
if ([host isEqualToString:[Globals sharedGlobals].currentLink])
{
NSLog(@"yes");
return YES;
}
NSLog(@"no");
return NO;
}