更新我的代码,从UIWebView到WKWebview,但在我的委托方法上出现了这个错误。
Nullability specifier 'nonnull' conflicts with existing specifier 'null_unspecified'
这是我的代码,显示这个错误的 navigation
- (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation{
// Show & animate the activity indicator.
_webView.spinner.hidden = NO;
[_webView.spinner startAnimating];
}
看起来你在某个地方重新声明了这个委托方法,可能是在委托头中,所以找到它并使用原来的方法。
- (void)webView:(WKWebView *)webView didCommitNavigation:(null_unspecified WKNavigation *)navigation;