Wow, it’s been a few years since I was last here.
After frantically diving into a few Objective-C books, I managed to come up with a working iOS WebBrowserComponent (attached below - just copy over the JUCE source files with the files in the zip).
However, the UIWebView does not pass touch events through to the component peer, which I desperately need. I found this posting which describes a clean method of passing events, and an even simpler method described in the comments:
I found more simple way:
just add UITapGestureRecognizer:
UITapGestureRecognizer *tgr = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)];
tgr.delegate = self;
And override message in delegate:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
My problem is that I am NOT an Objective-C expert and I’ve been floundering trying to figure out how to implement this in the iOS code I wrote (which admittedly I mostly copied and pasted from the JUCE OSX files).
I vaguely understand that I have to add a delegate to webView in the attached file juce_ios_WebBrowserComponent.mm, but I really don’t know how to go about it. Can anyone 'splain to me how I should be doing this (or even take a crack at it yourself)?
ETA [10/03/2011 - 17:55 GMT]: File updated with new code: