WKWebView监听URL跳转

[_webView addObserver:self forKeyPath:@"URL" options:NSKeyValueObservingOptionNew context:nil];

-(void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void*)context{

    NSLog(@"url == %@",self.webView.URL.absoluteString);
}

你可能感兴趣的:(WKWebView监听URL跳转)