UINavigationController flashes white when I add it to a superview
Posted
by Chris Stamper
on Stack Overflow
See other posts from Stack Overflow
or by Chris Stamper
Published on 2010-04-06T15:39:37Z
Indexed on
2010/04/06
15:43 UTC
Read the original article
Hit count: 389
Hey guys,
I'm adding a NavigationController as a subview of my main view, with the flip animation (like a utility app/flipview thing).
Here's how I'm doing it:
[UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:.7]; [UIView setAnimationTransition:([self.tableController.view superview] ? UIViewAnimationTransitionFlipFromLeft : UIViewAnimationTransitionFlipFromRight) forView:self.tableHostView cache:YES];
[self.tableController.view removeFromSuperview];
settingsView* backView1 = [[settingsView alloc] initWithNibName:@"settingsView" bundle:nil]; backView1.delegate = self; UINavigationController* settingsNavStack = [[UINavigationController alloc]initWithRootViewController:backView1]; [backView1 release];
settingsNavStack.view.frame = CGRectMake(0, 0, 320, 460); settingsNavStack.navigationItem.title = @"Settings";
[self setBackView:settingsNavStack];
[settingsNavStack release];
[self.tableHostView addSubview:self.backView.view]; [[self backView]setDelegate: self];
When it loads, the view comes in very nicely. However, the navigation bar stays white until like .2 secs after the animation finishes.
Anyone know why the navigation bar wouldn't display right away?
© Stack Overflow or respective owner