Multiple Navigation controllers/Tab Bar controllers on one storyboard

a 夏天 提交于 2019-12-11 06:58:25

问题


Ok guys, novice here. I have a screen shot of storyboard I'm working on and I'm running into an issue where I can't name an item on my first tab bar because it points to a second tab bar controller. First I want to ask would this be proper use or should there only be one of these "types" per project. secondly, how the heck can I name the first tab bar item? I would do it normally by clicking on the tab element in the targeted view. Here's the screen shot.


回答1:


Typically you only have one TabBarController in your project, and it is the root view controller.

And in storyboards, you can name your tabs not on the controller, but on the tabs under the separate views. Try double clicking on the label below your red, blue, yellow, etc views to name your tabs. Or, you can select the area below the view (which should be a TabBarItem) and the use the Attribute Inspector on the right to edit the title.

Attribute Inspector:1



来源:https://stackoverflow.com/questions/8432928/multiple-navigation-controllers-tab-bar-controllers-on-one-storyboard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!