I am very new to Cocos2D (and Obj-C in general), but I am diving head first into a project to get my feet wet. Currently, I would like to have a mixture of Cocos2D MenuItems and Interface Builder UI Elements in the same scene. I can overlay the IB controls by creating a UIViewController and calling the addSubview method on the Director's OpenGL view. If I do this, however, Cocos2D Menu Items can not longer receive touch events, as the new subView is blocking them. How can I tell the view to ignore touch events where there are no IB UI Elements?
My Code:
UIViewController *testView = [[UIViewController alloc] initWithNibName:@"SimpleView" bundle:nil];
testView.view.transform = CGAffineTransformMakeRotation(-3.14 * (90) / 180.0);
testView.view.bounds = CGRectMake(0.0f, 0.0f, 1024.0f, 768.0f);
testView.view.center = CGPointMake(512.0f, 384.0f);
[[[CCDirector sharedDirector] openGLView] addSubview:testView.view];