UINavigationController – popupanimation错误

大家好! 我遇到了UINavigationController的animation问题。 我有主细节视图。 查看一个button,这是打开的详细视图。 详细视图正确打开,正常的标题animation和内容滑动。 但是,当我点击返回button,标题animation正确,细节内容瞬间消失,而不是animation。 以下是问题演示的链接: https : //www.youtube.com/watch?v = C4UApAhEhx8

开放我使用标准

AboutViewController *aboutViewController = [[AboutViewController alloc] initWithNibName:@"AboutViewController_iPhone" bundle:nil]; [self.navigationController pushViewController:aboutViewController animated:YES]; 

我试图用代码popup视图,没有后退button,但也有同样的问题。

对不起,我的英语不好。 谢谢!

如果你的代码中的某个地方要么用YESNO来强制呼叫viewWillAppear对应的某个对象,而是要让iOS决定,或者你用viewDidAppear [super viewWillAppear:animated]调用不匹配。

我有同样的问题,米哈的回答指出了我正确的方向。 在我的情况下,我有一个自定义的UITabBarController,我在viewDidAppear中做了一些处理。 问题是由[super viewDidAppear:animated];缺失造成的[super viewDidAppear:animated]; 在我看来,这是一个难题。

请使用回到上一个窗口的代码:

[self.navigationController pushViewController animated:YES];

我认为这会帮助你。

我有和你一样的问题,我的问题是我设置了一些视图控制器的viewwillappear方法中选项卡栏selectedindex,这会导致导航栏的一些错误。

所以我只是简单地将代码移动到viewdidappear,这修正了错误。

希望有一天你可以看到这一点,尽pipe你可能已经解决了这个问题。 所以希望这会帮助别人。

请使用回到上一个窗口的代码:

 [self.navigationController popViewController animated:YES];