ios 如何向标签栏控制器添加“入口点箭头”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27683590/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to add an "entry point arrow" to a tab bar controller?
提问by Trev?r
In Xcode 6.2 beta, I am able to make some view controllers such as "View Controller" or "Navigation view controller" the entry point of my interface by dragging and dropping the "entry point arrow" on it, it gives me something like this :
But when I want to drag this arrow on a tab bar controller, it does not work, so is that a bug or should I do it in another way ?
在 Xcode 6.2 beta 中,我可以通过将“入口点箭头”拖放到我的界面上来使一些视图控制器(例如“视图控制器”或“导航视图控制器”)成为我的界面的入口点,它给了我这样的东西:
但是当我想在标签栏控制器上拖动这个箭头时,它不起作用,所以这是一个错误还是我应该用其他方式来做?
回答by Abhishek Sharma
Try with following steps.
请按照以下步骤尝试。
1) Open StoryBoard
.
1)打开StoryBoard
。
2) select TabbarController
which you want to set as RootViewController
.
2) 选择TabbarController
您要设置为RootViewController
.
3) Open Properties
.
3)打开Properties
。
4) select InitialView Controller
Option.
4) 选择InitialView Controller
选项。
For help you can see following image
.
如需帮助,您可以查看以下内容image
。
回答by M_AWADI
回答by der_Chris
Had the same problem. The Answer above solved it using Xcode 6.4. So I think this is the right answer. But as I can′t comment to provide this alternative, I write a new answer
有同样的问题。上面的答案使用 Xcode 6.4 解决了它。所以我认为这是正确的答案。但是由于我无法评论以提供此替代方案,因此我写了一个新答案
It is also possible to:
还可以:
- open the
StoryBoard
perOpen as
Source Code
- In the XML
<document>
tag you can add theinitialViewController="viewVontrollerID"
tag - replace the
"viewVontrollerID"
with the id of the ViewController, that the application should start with. (keep the "")
- 打开
StoryBoard
每Open as
Source Code
- 在 XML
<document>
标签中,您可以添加initialViewController="viewVontrollerID"
标签 - 用
"viewVontrollerID"
ViewController 的 id替换,应用程序应以该 ID 开始。(保持 ””)
回答by negativeImprint
I couldn't find the "initial view controller" checkbox at first. Then I realized that this is because I was in the "Table View" not the "Table View Controller." When I clicked into the "Table View Controller" that checkbox appeared.
起初我找不到“初始视图控制器”复选框。然后我意识到这是因为我在“表视图”而不是“表视图控制器”中。当我单击“表视图控制器”时,该复选框出现了。