How I can detect element I click in UIWebView. I have simple html, but I want differ elements, so I want get for example "alt" from the element I click.
In points:
Is it possible?
You should add some bindings between your webview and your Objective-C. You can do this using javascript.
You pretty much inject javascript into the webview so you will get a event when some HTML element is touched. Then your javascript will communicate to Objective C, to trigger some action.
This is technique is described pretty well here: http://blog.techno-barje.fr/post/2010/10/06/UIWebView-secrets-part3-How-to-properly-call-ObjectiveC-from-Javascript/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With