我正在从我的 UIWebView 监听 url 加载。有没有办法检查请求是否有“_blank”的目标?:
- (BOOL) webView:(UIWebView *)webView
shouldStartLoadWithRequest:(NSURLRequest *)request
navigationType:(UIWebViewNavigationType)navigationType
{
if ([request targetIs:@"_blank"]) {
// do something.
}
}