Why Does the iPad Toolbar Refuse to Reappear When Orientation Changes?

Posted by dugla on Stack Overflow See other posts from Stack Overflow or by dugla
Published on 2010-04-29T00:44:28Z Indexed on 2010/04/29 0:47 UTC
Read the original article Hit count: 490

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about ipad

Related posts about toolbar