Xcode 10,UI 元素在哪里?

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

Xcode 10, where are the UI elements?

xcodeinterface-builderuistoryboardxcode10

提问by Edward Potter

Have been out of Swift coding for almost a year, I'm back.

离开 Swift 编程快一年了,我回来了。

Download Xcode 10 beta. Have I lost my mind? I've tried every trick I know, none of the UI elements show up in storyboard. Zero. The sidebar is empty.

下载 Xcode 10 测试版。我失去理智了吗?我已经尝试了我知道的所有技巧,故事板中没有显示任何 UI 元素。零。侧边栏是空的。

Xcode 10:

Xcode 10:

Xcode 10 Screenshot

Xcode 10 截图

Xcode 9, no problem there they are, all my UI buttons, etc.

Xcode 9,没问题,我所有的 UI 按钮等等。

thanks, this is kind of surreal. :-)

谢谢,这有点超现实。:-)

回答by Evgeny Karkan

Library content has moved from the bottom of the Inspectorarea to an overlay window, which can be moved and resized like Spotlightsearch. It dismisses once items are dragged, but holding the Optionkey before dragging will keep the library open for an additional drag.

库内容已从Inspector区域底部移动到覆盖窗口,可以像Spotlight搜索一样移动和调整大小。一旦拖动项目它就会消失,但Option在拖动之前按住键将使库保持打开状态以进行额外的拖动。

The library can be opened via:

图书馆可以通过以下方式打开:

  • a new toolbar button (image attached);

  • the View> Librariesmenu;

  • or the ??Lkeyboard shortcut.

  • 一个新的工具栏按钮(附上图片);

  • 所述View>Libraries菜单;

  • ??L键盘快捷键。

enter image description here

在此处输入图片说明

回答by Vivek

Don't scare about you don't find Library, Snippet, Media.

不要害怕你找不到图书馆、片段、媒体。

Find Library or Snippet

查找库或片段

Show Library

显示库

view -> Libraries -> Show Library

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明

Open Library

开放图书馆

view -> Libraries -> Show Library + Keyboard(Alt Key)

Shortcut Show Library : Command + Shift + L

快捷方式显示库:Command + Shift + L

Shortcut Open Library : Command + Shift + Alt + L

快捷方式打开库:Command + Shift + Alt + L

Note : This is only works when you are in storyboard or xib file, otherwise it will open snippet. Same shortcut will works for open snippet and show snippet

注意:这仅在您位于故事板或 xib 文件中时才有效,否则它将打开代码段。相同的快捷方式适用于打开片段和显示片段

Open/Show Snippet

打开/显示代码段

Same shortcut will works, let me explain.

相同的快捷方式将起作用,让我解释一下。

Just goto(select) .swiftfile or viewcontrolelr.hfile or viewcontroller.mfile and fire show library shortcut / open library shortcut it will show Snippet dialog.

只需转到(选择).swift文件或viewcontrolelr.h文件或viewcontroller.m文件并触发显示库快捷方式/打开库快捷方式,它将显示代码段对话框。

Find Media

查找媒体

view -> Libraries -> Show Media

Shortcut Show Library : Command + Shift + MShortcut Open Library : Command + Shift + Alt + M

快捷方式显示库:Command + Shift + M快捷方式打开库:Command + Shift + Alt + M

回答by Aashish

With xCode 11the icon has changed to +(a plus sign), while cmd+shift+Lworks as usual.

使用xCode 11,图标已更改为+(加号),而cmd+shift+L照常工作。

xCode 11 Screenshot

xCode 11 截图

回答by Ron Gahlot

for media library content you should use keyboard shortcut ??M

对于媒体库内容,您应该使用键盘快捷键 ??M

enter image description here

在此处输入图片说明

回答by Nirav

I have just found that it is as per screenshot and it will be opened with given shortcut/hotkey. Simply by dragging UI components to your Storyboard.

我刚刚发现它与屏幕截图相同,它将使用给定的快捷方式/热键打开。只需将 UI 组件拖到 Storyboard 即可。

Command + Shift + L

命令 + Shift + L

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明