一个故事板上的多个导航控制器/标签栏控制器 [英] Multiple Navigation controllers/Tab Bar controllers on one storyboard

查看:26
本文介绍了一个故事板上的多个导航控制器/标签栏控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,这里是新手.我有一个我正在处理的故事板的屏幕截图,但我遇到了一个问题,我无法在我的第一个标签栏上命名一个项目,因为它指向第二个标签栏控制器.首先,我想问一下这是否正确使用,或者每个项目是否应该只有这些类型"之一.其次,我怎么能命名第一个标签栏项目?我通常会通过单击目标视图中的选项卡元素来完成.这是屏幕截图.

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.

推荐答案

通常你的项目中只有一个 TabBarController,它是根视图控制器.

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

在故事板中,您可以不在控制器上命名选项卡,而是在单独视图下的选项卡上命名.尝试双击红色、蓝色、黄色等视图下方的标签来命名选项卡.或者,您可以选择视图下方的区域(应该是 TabBarItem)并使用右侧的 Attribute Inspector 来编辑标题.

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.

属性检查器:1

这篇关于一个故事板上的多个导航控制器/标签栏控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆