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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 04:09:28  来源:igfitidea点击:

How to add an "entry point arrow" to a tab bar controller?

iosxcodeinterface-builder

提问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 : enter image description here
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 中,我可以通过将“入口点箭头”拖放到我的界面上来使一些视图控制器(例如“视图控制器”或“导航视图控制器”)成为我的界面的入口点,它给了我这样的东西: enter image description here
但是当我想在标签栏控制器上拖动这个箭头时,它不起作用,所以这是一个错误还是我应该用其他方式来做?

回答by Abhishek Sharma

Try with following steps.

请按照以下步骤尝试。

1) Open StoryBoard.

1)打开StoryBoard

2) select TabbarControllerwhich you want to set as RootViewController.

2) 选择TabbarController您要设置为RootViewController.

3) Open Properties.

3)打开Properties

4) select InitialView ControllerOption.

4) 选择InitialView Controller选项。

For help you can see following image.

如需帮助,您可以查看以下内容image

enter image description here

enter image description here

回答by M_AWADI

its a litile bit confusing over versions on xCode, I'm using version 8.3.2 and it has the follwing

它对 xCode 上的版本有点困惑,我使用的是 8.3.2 版,它有以下内容

select navigation controller

选择导航控制器

select navigation controller

select navigation controller

check the is initial view controller checkbox

检查是初始视图控制器复选框

2[select is initial view controller ]2

2[ select is initial view controller ] 2

回答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:

还可以:

  1. open the StoryBoardper Open asSource Code
  2. In the XML <document>tag you can add the initialViewController="viewVontrollerID"tag
  3. replace the "viewVontrollerID"with the id of the ViewController, that the application should start with. (keep the "")
  1. 打开StoryBoardOpen asSource Code
  2. 在 XML<document>标签中,您可以添加initialViewController="viewVontrollerID"标签
  3. "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.

起初我找不到“初始视图控制器”复选框。然后我意识到这是因为我在“表视图”而不是“表视图控制器”中。当我单击“表视图控制器”时,该复选框出现了。

Xcode View

Xcode 视图