我有一个带有两个选项卡的 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)被动画化,并且视图在没有动画的情况下消失。有什么问题?