gpt4 book ai didi

ios - UITabBarController 添加不带选项卡栏项目的 View Controller

转载 作者:行者123 更新时间:2023-11-29 05:56:28 26 4
gpt4 key购买 nike

我正在创建一个iOS应用程序,我需要添加一个SideMenu和一个UITabBarController,SideMenu和UITabBarController的目的是让用户在不同的ViewControllers之间导航,我在UITabBarController中有3个选项卡栏项目,在SideMenu中有5个项目,当用户单击侧面菜单中的项目时,我必须显示相应的 View Controller

问题:可以将没有 TabBarItem 的 ViewController 添加到 UITabBarController 中,当用户单击侧面菜单项时,我触发 UITabBarController 选择相应的 View Controller ,或者在 UITabBarController 中不可能我需要找到另一个解决方案,如果是的话请建议哪种解决方案更好。

enter image description here

在上图中,这些是我的 View Controller ,但我需要隐藏最后一个 View Controller 的选项卡栏项目,并在我以编程方式从侧面菜单中选择最后一个 View Controller 时保持 UITabBarViewController 的正常行为

最佳答案

如果侧边菜单的ViewController与TabBar不同。您可以直接在选项卡栏中选择的 Controller 中推送 View 。

关于ios - UITabBarController 添加不带选项卡栏项目的 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55105589/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com