views:

251

answers:

2

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 ?

A: 

did you ever find an answer to this? I'm having a similar issue...

dewberry
A: 

We found a solution using the setAnimationDelay giving some time the tabbar to load and placed in view. Thought you have to alter the code a little in order to use the setAnimationDelay. You have to use the setyanimationdelay just before the setanimationtransition and the setanimationtransition just before the commitAnimations. So the code above should end to:

[UIView setAnimationDelay:2]; // 2 seconds delay seems to be working for us  
[UIView setAnimationTransition: UIViewAnimationTransitionFlipFromRight forView:self.window  cache:YES];  
[UIView commitAnimations];  
dangel