问题描述
我有一个问题,似乎很简单。
我的应用程序有一个视图层次结构,包含一个UITabBarController包含UINavigationControllers。当我从根导航到第二级
我设置hidesBottomBarWhenPushed为true,以便标签栏隐藏
在我的firstLevelController:
[secondLevelController setHidesBottomBarWhenPushed:YES];
[self.navigationController pushViewController:secondLevelController animated:YES];
之后,当我推到第三级时,我再次通过在secondLevelController :
[self setHidesBottomBarWhenPushed:NO];
[thirdLevelController setHidesBottomBarWhenPushed:NO];
[self.navigationController pushViewController:thirdLevelController animated:YES];
(我知道,我不喜欢 [self setHidesBottomBarWhenPushed:NO ]
,但它没有工作否则...)
所以,这里是问题:
<$>
p $ p> thirdlevelController显示tabbar,而secondLevelController在弹出thirdLevelController时不显示tabbar。 I've a problem with something that seems to be very simple.My app has a view hierarchy consisting in a UITabBarController containing UINavigationControllers. When I navigate from the root to the second levelI set the hidesBottomBarWhenPushed on true so that the tab bar is hidden On my firstLevelController: After that when I push to the third level, I bring the tab bar again by doing in the secondLevelController: (I know, I didn't like the So, here is the problem: when I push the back button in the third level and the second view appears, I need to hide the tabbar again but I couldn´t find the way of doing this. Any help is appreciated This is what works for me. The thirdlevelController shows the tabbar and secondLevelController does not show the tabbar when you pop the thirdLevelController. 这篇关于hidesBottomBarWhenPushed但弹出时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! [self setHidesBottomBarWhenPushed:NO];
[thirdLevelController setHidesBottomBarWhenPushed:NO];
[self.navigationController pushViewController:thirdLevelController animated:YES];
[self setHidesBottomBarWhenPushed:YES];
[secondLevelController setHidesBottomBarWhenPushed:YES];
[self.navigationController pushViewController:secondLevelController animated:YES];
[self setHidesBottomBarWhenPushed:NO];
[thirdLevelController setHidesBottomBarWhenPushed:NO];
[self.navigationController pushViewController:thirdLevelController animated:YES];
[self setHidesBottomBarWhenPushed:NO]
either, but it didn´t work otherwise...)[self setHidesBottomBarWhenPushed:NO];
[thirdLevelController setHidesBottomBarWhenPushed:NO];
[self.navigationController pushViewController:thirdLevelController animated:YES];
[self setHidesBottomBarWhenPushed:YES];