swift - 如何在子 ViewController 上 segue 后显示 UITabBar?
问题描述
我有 4 个 mainViewController
连接到UITabBarController
. 这些是我的应用程序的 4 个主屏幕。这 4 个屏幕中的每一个屏幕上都有一个图标TabBar
。
现在,在这些主屏幕之一中,我希望能够单击一个按钮来显示一个新的“子”视图控制器。当我从MainVC
转到 theChildVC,
时,UITabBar
不会显示在ChildVC
. 我怎样才能得到UITabBar
保持显示?我不想添加ChildVC
到UITabBar
,因为它不应该在栏上有图标。
我愿意使用任何类型的 segue 或视图组合。
在 内MainVC
,我想单击一个按钮来显示而不会ChildVC
丢失(并且不添加为图标)。UITTabBar
MainVC
ChildVC
UITabBar
解决方案
如果我正确理解了您的问题的假设,您应该将所有 4 个“主屏幕”堆叠到单独的导航堆栈 (UINavigationController) 中。
所以结果将是:
UITabBarController -> UINavigationController -> UIViewController (1 of those main screens) click button -> Desired UIViewController
推荐阅读
- html - Unable to align heading to the left side
- jenkins - Jenkins管道无法打开文件
- javascript - 如何使用 JavaScript/JQuery 在表单中显示所有 HTML 输入值的摘要?
- java - 在加载期间禁用 PrimeFaces DataTable 中的选择
- facebook - 老开发者从 Facebook Messenger 管理员角色中删除,现在 facebook 返回“fbErrorSubcode”:492
- php - PHP 的 shell_exec 没有运行 screen -dmS screen_name
- sql - 将参数传递给子查询
- javascript - 如何以编程方式在 javascript 中测试 OCTANE 分数?
- html - 如何从图标高度中心垂直居中对齐文本
- python - Python 在 ODE 函数中出现错误:无法将数组数据从 dtype('complex128') 转换为 dtype('float64')