0

I have a situation: I have web site in HTML5 with some controls(like buttons, check-boxes, ect.) and native application with UIWebView. Can I get the ID of pressed control in web site within UIWebView. I mean, can I know (in the native application) pressed some control or not.

With Best Regards Maxim Tartachnik

kroumvud
  • 358
  • 6
  • 19

1 Answers1

0

You could attach javascript to the controls in the web page, and then intercept the firing of this javascript inside your objective c code by attaching a UIWebViewDelegate to your UIWebView and using the following delegate method.

webView:shouldStartLoadWithRequest:navigationType:

How to do this is described fully in this answer below, and see others in the same thread for more details:

https://stackoverflow.com/a/1662762/758298

Community
  • 1
  • 1
gamozzii
  • 3,911
  • 1
  • 30
  • 34