2
votes

I like the default "push" animation that the UINavigationController uses, but I want to slow it down to about 1.0 seconds. Any advice?

PS- I tried using CATransition with kCATransitionPush and kCATransitionFromRight, but i got a weird fade-to-white effect that was undesirable.

2

2 Answers

0
votes

In my app (flashcard app) I use this code:

FlashCardFlipVC * flipvc = [[FlashCardFlipVC alloc] initWithFlashCardData:_card];
flipvc.navigationItem.title = self.navigationItem.title;

[UIView  beginAnimations:@"ShowAnswers" context: nil];
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.75];
[self.navigationController pushViewController: flipvc animated:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.navigationController.view cache:NO];
[UIView commitAnimations];

[flipvc release];

It sets different than normal animation pattern (curl up instead of slide) and different time setting. You can use your own of course.

-3
votes

Have you tried setting setAnimationDuration:?