【发布时间】:2013-01-07 12:31:58
【问题描述】:
我正在尝试制作一个基于导航的应用程序,在导航堆栈中包含三个 UIViewController。我有一个底栏 (UITabBar)。
我想在第一个UIViewController 被推入堆栈时隐藏标签栏,我想在第二个UIVIewController 被推入时显示标签栏。
这是我为此编写的代码。
首先UIVIewController:
NotificationDetailsVC *obj = [[NotificationDetailsVC alloc] init];
obj.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:obj animated:YES];
[obj release];
第二次UIViewController我已经完成了:
NotificationBO *obj=[self.notificationsArray objectAtIndex:indexPath.row];
object.hidesBottomBarWhenPushed = NO;
[self.navigationController pushViewController:object animated:YES];
[object release];
现在的问题是,我可以为第一个 UIViewController 隐藏 UITabBar,但第二个它也被隐藏了。
我该如何解决这个问题?
【问题讨论】:
标签: iphone ios uinavigationcontroller uitabbarcontroller