更改UIviewController转换的持续时间

时间:2013-05-15 20:30:16

标签: ios objective-c uiviewcontroller core-animation catransaction

我正在使用此代码在一个视图控制器之间进行切换:

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];

代码工作正常,但似乎没有考虑动画的持续时间。无论我插入什么价值,它总是非常快。

0 个答案:

没有答案