Note: I've read all the other posts about this, but nothing worked for me.
My CEngine.cpp is basically the one from the Ogre template. I have a separate AppDelegate.m with a -applicationDidFinishLaunching method, which currently looks like this:
I see my Ogre scene and I see the view above it (the custom view I've created has a label in it, which is shown above the Ogre scene). Sohaving a transparent view above the Ogre scene works - but it doesn't catch any touch events. When I comment out the [self go] it catches the touch events (I've checked by letting -touchesBegan: output to the console log) but as soon as I start Ogre it won't work. I've already tried becomeFirstResponder on the view - didn't work.
Can anybody tell me what I have to do so that all touches are handled by my custom UIView and not by Ogre?
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
// Hide the status bar
[[UIApplication sharedApplication] setStatusBarHidden:YES];
mDisplayLinkSupported = FALSE;
mLastFrameTime = 1;
mStartTime = 0;
mTimer = nil;
// A system version of 3.1 or greater is required to use CADisplayLink. The NSTimer
// class is used as fallback when it isn't available.
#if USE_CADISPLAYLINK
NSString *reqSysVer = @"3.1";
NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending)
mDisplayLinkSupported = TRUE;
#endif
[self go];
// Create the window, it's not created without a nib
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Create a subview that is clear
TouchView *myView = [[TouchView alloc] initWithFrame:[self.window bounds]];
[myView setBackgroundColor:[UIColor clearColor]];
// Add the subview and release the memory, sicne the window owns it now
[self.window addSubview:myView];
[myView release];
[self.window makeKeyAndVisible];
}