1

我使用以下代码推送 Viewcontroller:

 if (! self.infoViewController) {
     self.infoViewController = [[InfoViewController alloc] initWithNibName:@"InfoViewController" bundle:nil];
 }
    [UIView animateWithDuration:0.7f
                     animations:^{
                         [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
                         [self.navigationController pushViewController:self.infoViewController animated:NO];
                         [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];
                     }];

是否可以禁用导航栏标题动画?它在动画期间从左侧滑动。

4

2 回答 2

1

像这样推送没有动画的 ViewController:

if (! self.infoViewController) {
     self.infoViewController = [[InfoViewController alloc] initWithNibName:@"InfoViewController" bundle:nil];
 }
[self.navigationController pushViewController:self.infoViewController animated:NO];

这不会为您的推送标题设置动画。我希望这会帮助你。

于 2013-01-10T16:28:34.837 回答
0

对不起。这是答案:

[UIView animateWithDuration:0.7f
                 animations:^{
                     [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
                     [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];
                 }];
[self.navigationController pushViewController:self.infoViewController animated:NO];
于 2013-01-10T17:13:57.987 回答