My question starts from a problem :
I started a project in XCode : a Navigation Bar based one (with a TableView). Then I added a few views, through IB or programmatically... which works perfectly fine. Then, I decided to write my Own ViewClass, inherited from UIView, called OpenGlView (based on the view provided by Basic OpenGlES project in XCode), and its OpenGlViewController (inherited from UIViewController).
This works fine until I try to push the view Controller into my navBar: then I receive a "EXC__ BAD __ACCESS". I can't understand why it is ok whith any View but the one used for display OpenGL content... And I actually have no idea how I can manage to develop a NavBar based App including a View displaying OpenGl contents... any idea?
(I also tried to add the OpenGlView as a subView of a basic UIView previously added to the NavigationBar, but I received the same error).
In the RootController :
OpenGlViewController *glvController;
...
if (glvController == nil)
{
glvController = [[OpenGlViewController alloc] initWithNibName:@"Gl View" bundle:nil];
glvController.title = @"GL View";
}
[self.navigationController pushViewController:glvController animated:YES];
in the OpenGlViewController :
- (void)loadView {
OpenGlView * view;
view = [[OpenGlView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
self.view = view;
[view release];
}