I'm not even sure that it even matters whether or not the subview is an EAGLView, but I'll try to explain anyway:
In my application delegate didFinishLaunchingWithOptions() function, I have the following code (some parts omitted since I dont think theyre neessary):
CGRect screenBounds = [[UIScreen mainScreen] bounds];
window = [[UIWindow alloc] initWithFrame: screenBounds];
view = [[EAGLView alloc] initWithFrame: viewBounds];
[window addSubview:view];
[window addSubview: overlayViewController.view];
[window makeKeyAndVisible];
Now, I have some functions within view (the EAGLView) from which I would like to call some functions within the overlayViewController.
For example, within view, I might have some function:
-(void)doSomethingInViewController
{
// somehow call a function within overlayViewController
}
Within that function defined in view, how can I access a function defined in overlayViewController? Thank you!