由于某种原因,永远不会调用以下webview UI委托方法。尝试打开,单击,与webview交互以触发委托调用,但无效。
- (void)webViewFocus:(WebView *)sender {
NSLog(@"focusing %@", sender);
}
- (void)webViewUnfocus:(WebView *)sender {
NSLog(@"unfocusing %@", sender);
}
- (BOOL)webViewIsStatusBarVisible:(WebView *)sender {
return YES;
}
- (void)webView:(WebView *)sender setStatusBarVisible:(BOOL)visible {
NSLog(@"%@ %d", sender, visible);
}
我确保代理正确连接,并且可以确认当用户想要打开新窗口时,- (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request
正确调用了WebUIDelegate方法。有什么想法吗?