[ERROR] decidePolicyForNavigationAction was not called
2020. 11. 3. 16:10ㆍ개발자료/iOS
반응형
decidePolicyForNavigationAction 함수만 선언하고 decisionHandler을 호출하지 않아서 발생
# Swift
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
decisionHandler(.allow)
}
# Objective-C
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
decisionHandler(WKNavigationActionPolicyAllow);
}
반응형
'개발자료 > iOS' 카테고리의 다른 글
UIWebView, WKNavigation Delegate 대칭표 (0) | 2020.11.04 |
---|---|
[CRASH] /usr/lib/libauto.dylib: mach-o, but not built for iOS simulator (0) | 2020.11.03 |
[Swift] 구문 이름표(Labeled Statements) (0) | 2020.11.02 |
[Swift-OpenSource] scalessec / Toast-Swift (0) | 2020.11.02 |
Interface Builder TableView Separator Line (0) | 2020.11.02 |