[英]How to link a tab bar with its view controllers in a storyboard?
If you've only ever used a tab bar controller and not a tab bar on its own, then don't close this or mark it as a duplicate based upon your presumptions and assumptions. 如果您只使用了标签栏控制器,而没有单独使用标签栏,则不要根据您的假设和假设将其关闭或将其标记为重复项。
I've added a tab bar to a view controller and now want to connect the tab bar with the view controllers that will be selected via it. 我已经将标签栏添加到视图控制器,现在想将标签栏与将通过它选择的视图控制器连接。
I've done this sort of thing many, many times before using a tab bar controller and assumed it would be just as straightforward as but when a using just a tab bar but no - I just can't find or see any way of doing it. 在使用标签栏控制器之前,我已经做过很多次这样的事情,并认为它就像直接使用标签栏但不使用时一样简单-我只是找不到或看到任何方法它。 Tried adding tab bar items to the view controller and tried dragging between these and the tab bar, and between the tab bar and the tab bar items and to the view controllers.
尝试将选项卡栏项目添加到视图控制器,并尝试在它们和选项卡栏之间,选项卡栏和选项卡栏项目之间以及视图控制器之间拖动。 Millions of combinations and can't get it to work.
数以百万计的组合无法正常工作。
Googling or searching for past questions on this isn't as straightforward as you'd think - because the search results all come back involving the use of a tab bar controller, I can't see anything for just a tab bar which is part of a regular view controller. 谷歌搜索或搜索过去的问题并不像您想的那么简单-因为搜索结果全部返回,涉及到使用选项卡栏控制器,所以对于仅属于其中一部分的选项卡栏我什么也看不到常规视图控制器。
I think, this is not possible using a storyboard. 我认为,使用分镜脚本是不可能的。 You should do this in code.
您应该在代码中执行此操作。
Or maybe hideBottomBarWhenPushed
is what you are searching for. 也许
hideBottomBarWhenPushed
是您要搜索的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.