【发布时间】:2013-09-24 13:16:28
【问题描述】:
我正在使用以下代码将 UIViewController 推送到导航堆栈中
[UIView animateWithDuration:0.75
animations:^{
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[self.navigationController pushViewController:ViewController animated:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];
}];
现在,当我按下返回时,我希望它执行相同的动画,但它不起作用。知道为什么吗?
在 ViewController.m 中
[UIView animateWithDuration:0.75
animations:^{
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[self.navigationController popToRootViewControllerAnimated:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO];
}];
【问题讨论】:
-
你把代码放在 ViewController.m 的什么地方?
标签: ios objective-c uinavigationcontroller