在uiwebview 中點擊事件觸發ios代碼
方法1:
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
}
```
攔截reuqest,判斷關鍵字來完成需求。這種方法太low了而且並不靈活
方法2:WebViewJavascriptBridge 庫
https://github.com/yaoquanfeng123/WebViewJavascriptBridgeDemoToApp