在 Xcode 中向我的故事板添加标签

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39822197/
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-09-15 09:22:54  来源:igfitidea点击:

Adding a Label to my Storyboard in Xcode

iphonexcode

提问by hungrybeast

I am using the latest Xcode and I am developing an iOS 10 app. Now I want to add a Button and a Label to my Storyboard. How?

我正在使用最新的 Xcode,并且正在开发一个 iOS 10 应用程序。现在我想向我的故事板添加一个按钮和一个标签。如何?

I currently have the First and Second Tab/Page and im a total Xcode newbie. I had a Hackintosh but it was slow, so I bought a Mac and now I am ashamed not to know how to add a Label item. I hope they will add a VisualStudio-like Interface as a optional setting... So back to the Question, how should I add Items? I am running El Capitan if it helps.

我目前有第一个和第二个选项卡/页面,我是一个 Xcode 新手。我有一个 Hackintosh 但它很慢,所以我买了一台 Mac,现在我很惭愧不知道如何添加标签项目。我希望他们将添加一个类似 VisualStudio 的界面作为可选设置......所以回到问题,我应该如何添加项目?如果有帮助,我正在运行 El Capitan。

回答by Roger Perez

In xcode 10.1 the Library to get a label is now on top next to the standard editor and assistant editor. I am new to xcode and was following an old video tutorial so it took me a while to find it.

在 xcode 10.1 中,用于获取标签的库现在位于标准编辑器和助理编辑器旁边的顶部。我是 xcode 的新手,正在关注一个旧的视频教程,所以我花了一段时间才找到它。

location of label for library xcode

图书馆 xcode 的标签位置

回答by Monomeeth

Within Xcode make sure Utilities are visible. Look at the top right of your Xcode window and ensure the Utilities icon is blue:

在 Xcode 中确保 Utilities 可见。查看 Xcode 窗口的右上角并确保 Utilities 图标为蓝色:

enter image description here

在此处输入图片说明

Now at the bottom of the Utilities pane, you should see a Filter field. In this field you can search for "Label" and "Button". When you have what you want, click and drag it to your storyboard.

现在在 Utilities 窗格的底部,您应该会看到一个 Filter 字段。在此字段中,您可以搜索“标签”和“按钮”。当你有你想要的东西时,点击它并将其拖到你的故事板中。

I would strongly recommend you do an online Xcode course or check out some YouTube videos. It will be definitely worth the time and money!

我强烈建议您参加在线 Xcode 课程或查看一些 YouTube 视频。这绝对值得花时间和金钱!

回答by Jichao

In Xcode 11.2, the Library's icon changed to a plus sign. enter image description here

在 Xcode 11.2 中,库的图标更改为加号。 在此处输入图片说明