1

I am using this code to change between one view controller to another:

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPad" bundle: nil];
UIViewController *lvc = [storyboard instantiateViewControllerWithIdentifier:@"ControllerWoodenPage3"];

[UIView  beginAnimations:@"ShowAnswers" context: nil];
[UIView setAnimationCurve: UIViewAnimationCurveEaseIn];
[UIView setAnimationDuration:1.4];
[self.navigationController pushViewController: lvc animated:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionNone forView:self.navigationController.view cache:NO];
[UIView commitAnimations];

The code works fine, but it seems that the duration of the animation is not taken in consideration. it is always very fast, whatever value I insert.

jszumski
  • 7,332
  • 11
  • 38
  • 53
Alessandro
  • 3,859
  • 11
  • 58
  • 124
  • check http://stackoverflow.com/questions/11723545/use-of-beginanimations-discouraged I think beginAnimations is discouraged from 4.0 from the question. – ram2013 May 15 '13 at 20:34
  • 1
    You're not doing anything here in terms of animation. What exactly are you trying to accomplish? – Stavash May 15 '13 at 20:35
  • slow down the push of the view controller from the standard 0.3 secs to 0.7f secs – Alessandro May 15 '13 at 20:37
  • Lots of answers provided at http://stackoverflow.com/questions/2215672/how-to-change-the-push-and-pop-animations-in-a-navigation-based-app – zimmryan May 15 '13 at 22:03

0 Answers0