首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >UINavigationController动画

UINavigationController动画
EN

Stack Overflow用户
提问于 2012-05-03 03:03:38
回答 1查看 355关注 0票数 0

我有一个带有两个选项卡的tabBar应用程序。每个选项卡都有自己的navigationController,以这种方式实现:

代码语言:javascript
复制
FirstViewController *firstController = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
UINavigationController *firstNavController = [[UINavigationController alloc] initWithRootViewController:firstController];

SecondViewController *secondController = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
UINavigationController *secondNavController = [[UINavigationController alloc] initWithRootViewController:secondController];

tabBar.viewControllers = [NSArray arrayWithObjects:firstNavController, secondNavController, nil];

当我想要将一个视图推到一个选项卡中时,我使用以下命令:

代码语言:javascript
复制
[self.navigationController pushViewController:activityController animated:YES];

当我在推送视图上时,我想弹出我使用的视图:

代码语言:javascript
复制
[self.navigationController popViewControllerAnimated:YES];

推送动画效果很好,但在流行动画中,只有顶栏( NavigationController)有动画效果,视图没有动画就消失了。会出什么问题呢?

EN

回答 1

Stack Overflow用户

发布于 2012-05-03 03:10:02

尝试使用[self.navigationController popToRootViewControllerAnimated:YES];

而不是[self.navigationController popViewControllerAnimated:YES];,并告诉我这是否有效。记住网络导航控制器。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10420046

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档