IPhone SDK - Transition to NavigationController display problem

Posted by Steblo on Stack Overflow See other posts from Stack Overflow or by Steblo
Published on 2010-03-13T15:58:00Z Indexed on 2010/03/13 16:05 UTC
Read the original article Hit count: 547

Filed under:
|
|

Hi,

I am nearly finished with my first IPhone app and everything works fine - except of one very little display bug:

My starscreen is an UIView (Fullscreen) without Navigationbar or Toolbar. If I tap on a start button, there is an UIViewAnimationTransitionFlipFromRight animation that flips to the main navigation controller:

-(IBAction) switchViewToMainMenu {
[UIView beginAnimations:@"Flip View" context:nil];
[UIView setAnimationDuration:1.25];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

[UIView setAnimationTransition: UIViewAnimationTransitionFlipFromRight forView:self.window cache:YES];
[self.navController viewWillAppear:YES];
[self.startScreenViewController viewWillDisappear:YES];

[self.startScreenViewController.view removeFromSuperview];  
[self.window addSubview:navController.view];    

[self.startScreenViewController viewDidDisappear:YES];
[self.navController viewDidAppear:YES];
[UIView commitAnimations];
self.startScreenViewController=nil;
[startScreenViewController release];

}

This works fine except of one little problem:

When the navigation controller view appears (flips in), the Navigationbar on top is some pixels too high (the is a white bar where the Navigationbar should be). When the animation finished, the Navigationbar drops down to the right position. This doesn't look very beautiful...

Any ideas how to fix that problem ?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about SDK