title: how to intercept Button click inside UIWebview on IOS?
body: <p>I have a HTML form that has certain fields which i am opening inside a UIWebview. On click of a particular button i want to do a in app action.</p>
  
  <p>The approach i'm using now is on click of the button i redirect the page to a dummy URL. I sniff the URL using delegate method "shouldStartLoadWithRequest" and stop the redirection. I then do my custom event (capture image and upload) and then continue. This seems to be an ugly hack. Anyway i can directly hook into the button click event rather than a page redirection?</p>
  
  <p><strong>UPDATE</strong>
  There seems to be no way to setup a delegate method to fire when a JS function is called on button click. The only way to do this is to use the URL sniffing method mentioned above. This has been explained in detail by joern below, so I will accept his answer.</p>