我正在尝试执行以下操作。
我有一个标签栏 Controller ,里面有 2 个标签。这两个选项卡都是导航 Controller ,每个选项卡上都有一个表格 View 。
现在当我在第一个选项卡中选择表格的一个单元格时,我正在插入另一个选项卡栏 Controller ,所以我想隐藏父 tabbarcontroller 的选项卡栏,当我单击导航栏上的后退按钮时我想再次看到父标签栏,因为我在我的父标签栏 View 中。
我尝试了 hidesbottombarwhenpushed 并且它隐藏了父选项卡栏 Controller 选项卡栏但是当我单击返回时它不会将它带回来。
最佳答案
好吧,最后我得到了答案,这就是我应该做的。
self.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:aViewController animated:YES];
self.hidesBottomBarWhenPushed=NO;
所以基本上 hidesBottomBarWhenPushed = YES,然后推送你的 View Controller ,然后 hidesBottomBarWhenPushed = NO;这就像一个魅力。
关于ios - 插入导航堆栈时隐藏 TabBar,弹出导航堆栈时将其恢复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4982373/