我的应用程序中有一个选项卡栏,其中有 3 个项目指向 3 个独立的 View Controller 。但是,在其中一个页面中,我有一个按钮转换到另一个 View Controller (单击该按钮,它会将您带到另一个页面),并且底部的选项卡不再可见。
想想 Instagram,您可以在其中搜索某个人...如果您单击该人的个人资料,底部的选项卡仍然可见且响应 swift ,而我的应用程序中的选项卡栏则不是。我需要 Instagram 在我的应用程序中具有相同的效果,但我对如何实现这一点感到困惑。
最佳答案
我创建了一个示例项目来解释我想要解释的内容
屏幕截图 - Storyboard
查看层次结构
---> Tab Controller
---> Tab Vc 1 --> ContentView With Navigation Controller
---> Tab Vc 2 --> ContentView With Navigation Controller
---> Tab Vc 3 --> ContentView With Navigation Controller
---> Demo Vc - Which wis the second ViewController to be displayed with in Tab Bar bounds
输出
项目链接
链接 - https://github.com/RockinGarg/ContainerView-TabBar.git
检查分支 - stack_Tab_VC_Container
克隆 - git clone -b stack_Tab_VC_Container https://github.com/RockinGarg/ContainerView-TabBar.git
关于swift - 将标签栏添加到所有屏幕,即使标签按钮不能立即访问该屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50766850/