从 tabGroup 的导航中删除选项卡而不将其从 tabGroup 中删除?
我正在使用 Appcelerator Titanium 构建 iPhone 应用程序。我目前有一个 tabGroup 控件,它链接到应用程序的主要部分,包括主屏幕。
我想做的是仅从导航中删除“Home”选项卡,而不是从 tabGroup 对象中删除它。因此,例如,我仍然可以调用 tabGroup.setActiveTab(0)
它会将我带到主屏幕,但底部的选项卡没有“主页”按钮。
这可能吗?如果是这样,我该怎么办?
注释:我不想想要隐藏整个栏,只是隐藏一个选项卡。我也不想想要从底层对象中删除屏幕,只是导航 UI。另外,我只针对 iPhone 进行开发,并不关心其他平台是否不受支持,因此仅适用于 iPhone 的解决方案是可以接受的。
I'm using Appcelerator Titanium to build an iPhone app. I currently have a tabGroup control that links to the major sections of the app, including the home screen.
What I'd like to do is remove the "Home" tab only from the navigation, without removing it from the tabGroup object. So, for example, I'd still be able to call tabGroup.setActiveTab(0)
and it would take me to the home screen, but the tabs at the bottom wouldn't have a "home" button.
Is this even possible? If so, how can I do it?
Notes: I do not want to hide the whole bar, just a single tab. I also do not want to remove the screen from the underlying object, just the navigation UI. Also, I'm only developing for iPhone and don't care if other platforms aren't supported, so iPhone-only solutions are acceptable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将主屏幕完全从选项卡组中取出,并单独管理它的显示和转换;最终,这将是一个更清洁的解决方案。
take the home screen out of the tab group completely and manage displaying it and transitioning to it separately; in the end, it will be a cleaner solution.
您是否尝试过
tab.hide()
或在创建选项卡时将其设置为visible: 0
?Have you tried
tab.hide()
or when creating the tab setting it tovisible: 0
?