我有一个带有两个选项卡的tabBar应用程序。每个选项卡都有自己的navigationController,以这种方式实现:
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];当我想要将一个视图推到一个选项卡中时,我使用以下命令:
[self.navigationController pushViewController:activityController animated:YES];当我在推送视图上时,我想弹出我使用的视图:
[self.navigationController popViewControllerAnimated:YES];推送动画效果很好,但在流行动画中,只有顶栏( NavigationController)有动画效果,视图没有动画就消失了。会出什么问题呢?
发布于 2012-05-03 03:10:02
尝试使用[self.navigationController popToRootViewControllerAnimated:YES];
而不是[self.navigationController popViewControllerAnimated:YES];,并告诉我这是否有效。记住网络导航控制器。
https://stackoverflow.com/questions/10420046
复制相似问题