Define the item that I click in UIWebView

How can I detect an element that I click in a UIWebView. I have a simple html, but I want to be different from the elements, so I want to get, for example, "alt" from the element that I click.

In points: 1. Click on one of the images uploaded to WebView. 2. It calls a function that has information about the click element.

Is it possible?

+5
source share
1 answer

You should add some bindings between your webview and your Objective-C. You can do this using javascript.

javascript -, , - HTML. javascript Objective C, .

: http://blog.techno-barje.fr/post/2010/10/06/UIWebView-secrets-part3-How-to-properly-call-ObjectiveC-from-Javascript/

+8

All Articles