Why Does the iPad Toolbar Refuse to Reappear When Orientation Changes?
- by dugla
I have a fullscreen OpenGL iPad app that behaves correctly for all orientation changes. I now want to add a UIToolbar programmatically and while it appears correctly in launch orientation - portrait in the Xcode simulator - it dissapears when the orientation changes to landscape. Change the orientation back to portrait and the Toolbar reapppears. Huh?
- (void)loadView {
NSLog(@"EAGL ViewController - load View");
CGRect frame = [[UIScreen mainScreen] applicationFrame];
EAGLView *eaglView = [[[EAGLView alloc] initWithFrame:frame] autorelease];
self.view = eaglView;
[[NSBundle mainBundle] loadNibNamed:@"Toolbar" owner:self options:nil];
NSLog(@"%@", [[self.toolbar class] description]);
[self.view addSubview:self.toolbar];
[self.view bringSubviewToFront:self.toolbar];
}
What have I failed to do here?
Thanks,
Doug