I am working on an iPad application based on UIWebView: to explain it in the simplest conditions, the application shows one large interactive web view and, in addition, supports user gestures.
I need to catch events that represent individual cranes in a webview, but only when the cranes have not been used by the webview (i.e. they are not the start of the scroll / zoom operation, they are not link cranes, they are not cranes that run some javascript).
UIWebView is very greedy for its events, and, in my experience, it does not distribute them even when they are not consumed. To catch the events, I finished subclassing the main UIWindow (see http://mithin.in/2009/08/26/detecting-taps-and-events-on-uiwebview-the-right-way/ ). This works well, but the problem is that I cannot find out if the taps I get triggered in javascript in webview or not.
As an additional limitation, I cannot control the javascript that will be run in the UIWebView or the HTML that it will be displayed.
So the question will be: what is the way to detect all and only crane events that did not trigger any other actions in the UIWebView itself, especially in javascript actions?
~
If you're interested, the source code for the project I'm working on is on GitHub: to find it, just ask Google to point you to the Baker Framework.
source share