我正在使用此代码在一个视图控制器之间进行切换:
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];
代码工作正常,但似乎没有考虑动画的持续时间。无论我插入什么价值,它总是非常快。