小编Nic*_*las的帖子

hidesBottomBarWhenPushed但弹出时

我遇到的问题似乎非常简单.我的应用程序有一个视图层次结构,包含一个包含UINavigationControllers的UITabBarController.当我从根导航到第二级时,我将hidesBottomBarWhenPushed设置为true,以便隐藏选项卡栏

在我的firstLevelController上:

[secondLevelController setHidesBottomBarWhenPushed:YES];

[self.navigationController pushViewController:secondLevelController animated:YES];
Run Code Online (Sandbox Code Playgroud)

之后当我推到第三级时,我再次通过在secondLevelController中执行标签栏:

[self setHidesBottomBarWhenPushed:NO];

[thirdLevelController setHidesBottomBarWhenPushed:NO];

[self.navigationController pushViewController:thirdLevelController animated:YES];
Run Code Online (Sandbox Code Playgroud)

(我知道,我不喜欢这[self setHidesBottomBarWhenPushed:NO]两种,但它不起作用......)

所以,问题在于:当我按下第三级的后退按钮并出现第二个视图时,我需要再次隐藏标签栏,但我找不到这样做的方法.

任何帮助表示赞赏

iphone cocoa-touch uiviewcontroller uinavigationcontroller

3
推荐指数
2
解决办法
7803
查看次数