views:

941

answers:

2

Hi All, I have a small problem with UINavigationController animation between two view. My application build more than two view, first view contains login information, second view contains root menu, last view contains sample data and so on.. My MainWindow.xib contains a UINavigationController component which is contains all navigation structure. When my login view loaded, i use this lines of code

- (void)viewWillAppear:(BOOL)animated {
[self.navigationController setNavigationBarHidden:YES animated:NO];

}

for hide UINavugationConttoller (I don't need to show to user navigation bar during the login.) After that when the user execute the login submit button on the login view i use this code for push the RootmenuView to the UINavigationController's stack.

RootMenuController *rootMenuController = [[RootMenuController alloc] initWithNibName:@"RootMenuController" bundle:0];   
[self.navigationController pushViewController:rootMenuController animated:NO];
[rootMenuController release];

It's working very well. And when the Rootmenuview loaded user have to show the navigation bar then i'm showing the UINavigation's tool bar with this code

- (void)viewDidAppear:(BOOL)animated {
[self.navigationController setNavigationBarHidden:NO animated:YES];

}

But i don't like the default animation transitions of UINavigationController then i changed above code with below

    [UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:0.50];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

[UIView setAnimationTransition:
 UIViewAnimationTransitionFlipFromRight
        forView:self.navigationController.view cache:YES];
RootMenuController *rootMenuController = [[RootMenuController alloc] initWithNibName:@"RootMenuController" bundle:0]; 
[self.navigationController pushViewController:rootMenuController animated:NO];

[UIView commitAnimations];

[rootMenuController release];

It's working too but UINavigationController flickering during between two view naimation transition.

I didn't solve this problem.

Any suggestions ?

Thank you

+1  A: 

Have you tried [setAnimationTransition:forView:cache:NO]? I got some odd behavior similar to yours when I used to mess around with UIView animations and used caching.

refulgentis
When change to cache:YES to NO in my view transitions statement, it isn't flickering. Thank you refulgentis
fyasar
A: 

As above you can change the animation of the transition between views going one way but can you change it going back the other way?

iamsmug