0
我不確定我是否在良好的路徑,但我注入了一些javascript通過webView:shouldStartLoadWithRequest:navigationType
通知我,只要touch event
發生在UIWebView的。我能夠從觸摸事件中恢復目標對象,但我不確定從那裏繼續。iOS - 獲取我通過JavaScript在UIWebView中點擊的圖像的URL
我注入什麼:
[webView stringByEvaluatingJavaScriptFromString:
@"function MyFunction(e){document.location='http://null/'+e.touches[0].target;}
window.ontouchstart=function(e){MyFunction(e)}"
];