显示 Xcode 11 中缺少的助理编辑器?

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

Show Assistant Editor missing in Xcode 11?

xcodexcode10xcode11

提问by Hackman

In Xcode 10, the toolbar had an inter-locking ring icon which showed the assistant editor, it's missing in Xcode 11.

在 Xcode 10 中,工具栏有一个互锁环图标,显示助手编辑器,在 Xcode 11 中没有。

Xcode 10

Xcode 10

Xcode 11

Xcode 11

回答by Caleb

In Xcode 10, the toolbar had an inter-locking ring icon which showed the assistant editor, it's missing in Xcode 11.

在 Xcode 10 中,工具栏有一个互锁环图标,显示助手编辑器,在 Xcode 11 中没有。

The interface has changed a little, but the functionality is still there. The top right corner of the editor pane has two buttons:

界面略有变化,但功能仍然存在。编辑器窗格的右上角有两个按钮:

top right corner of Xcode text editor pane

Xcode 文本编辑器窗格的右上角

Clicking the left button, which looks like lines of text, displays the popup menu, where you can choose various editor configuration options. Clicking the right button just narrows the existing editor and adds another one next to it.

单击看起来像文本行的左按钮,会显示弹出菜单,您可以在其中选择各种编辑器配置选项。单击右键只会缩小现有编辑器的范围并在其旁边添加另一个编辑器。

Some of the same options are also available in the Editor menu in the main menu bar.

主菜单栏中的编辑器菜单中也提供了一些相同的选项。



Update:This is from the Xcode 11 beta release notes, and perhaps more fully explains why the UI was changed:

更新:这是来自Xcode 11 beta release notes,也许更全面地解释了 UI 更改的原因:

Editors can be added to any window without needing the Assistant Editor. Editors are added using the “Add Editor” button in the jump bar or the File > New > Editor command. Each editor can now be in one of three modes: “Editor Only”, “Editor and Assistant” or “Editor and Canvas”. The latter two modes automatically show relevant content when available. When using multiple editors, the View > Editor > Focus command can be used to temporarily expand the active editor to fill the entire window, hiding other editors. For source control support, the Code Review button in the Toolbar replaces the Comparison Editor. The “Show Authors” command is now available from the Source Editor's Editor menu. The SCM Log is now in the Inspector Area. (43806898)

无需助手编辑器即可将编辑器添加到任何窗口。使用跳转栏中的“添加编辑器”按钮或“文件”>“新建”>“编辑器”命令添加编辑器。每个编辑器现在可以处于三种模式之一:“仅限编辑器”、“编辑器和助手”或“编辑器和画布”。后两种模式在可用时自动显示相关内容。使用多个编辑器时,可以使用“视图”>“编辑器”>“焦点”命令临时展开活动编辑器以填充整个窗口,隐藏其他编辑器。对于源代码控制支持,工具栏中的代码按钮取代了比较编辑器。“显示作者”命令现在可从源代码编辑器的编辑器菜单中使用。SCM 日志现在位于检查器区域中。(43806898)

With multiple editors possible in a window, you need editor-specific controls for showing the ancillary views like the assistant editor, author view, etc.

由于一个窗口中可能有多个编辑器,您需要特定于编辑器的控件来显示辅助编辑器、作者视图等辅助视图。



From SMGreenfield's comment:

来自 SMGreenfield 的评论:

Sometimes I want to look at a different part of the same darn document. There has always been a way to do this, but it involved jumping through hoops.

有时我想查看同一个该死的文档的不同部分。一直有一种方法可以做到这一点,但它涉及跳过箍。

Just add another editor: click the Add Editor button in the upper right corner of the editor, or choose File > New > Editor. The new editor will default to showing the same file you were working on in the existing editor.

只需添加另一个编辑器:单击编辑器右上角的“添加编辑器”按钮,或选择“文件”>“新建”>“编辑器”。新编辑器将默认显示您在现有编辑器中处理的相同文件。

If new editors show up on the right of the existing editor and you'd prefer them to stack vertically, you can choose View > Change Editor Orientation. If you want them to stack horizontally most of the time (the default) but just want one to show up below, choose File > New > Editor Below.

如果新编辑器出现在现有编辑器的右侧并且您希望它们垂直堆叠,您可以选择View > Change Editor Orientation。如果您希望它们大部分时间(默认)水平堆叠,但只想显示在下方,请选择File > New > Editorbelow 。

回答by Hackman

Shortcuts:

快捷方式

  • control+ option+ command+ return: Show Assistant Editor
  • command+ return: Show Editor only (hide Assistant Editor)
  • control+ option+ command+ return: 显示助理编辑器
  • command+ return: 仅显示编辑器(隐藏助理编辑器)

Using Editor on the Toolbar

使用工具栏上的编辑器

enter image description here

在此处输入图片说明

回答by Mike Zriel

It has moved, to show it click on icon with horizontal lines and select Assistant. enter image description here

它已经移动,单击带有水平线的图标并选择助手以显示它。 在此处输入图片说明

回答by janaz

In case you can't use Add Editorbutton just use shortcut: Cmd + Ctrl + Shift + Enter

如果您不能使用Add Editor按钮,请使用快捷方式: Cmd + Ctrl + Shift + Enter

回答by matt

In Xcode 11 we now have multiple editor panes. You can summon a second pane, a third pane, as many as you like.

在 Xcode 11 中,我们现在有多个编辑器窗格。您可以根据需要召唤第二个窗格、第三个窗格。

When you have a second pane, it does not have to be an automatic assistant. In other words, the editor pane itselfeither is an assistant or it is not. So if it is not, it is manual. And if it is, it is automatic.

当您有第二个窗格时,它不一定是自动助手。换句话说,编辑器窗格本身要么是助手,要么不是。所以如果不是,它是手动的。如果是,它是自动的。

To toggle between being an assistant and being an ordinary pane, choose Assistant from the Editor menu:

要在助手和普通窗格之间切换,请从编辑器菜单中选择助手:

  • If Assistant is checked, this is an assistant and is automatic. What it displays depends automatically on some other pane.

  • If Assistant is unchecked, this is an ordinary editor pane and is manual. You can display anything you like in this editor.

  • 如果选中Assistant ,则这是一个助手并且是自动的。它显示的内容自动取决于其他一些窗格。

  • 如果未选中Assistant ,则这是一个普通的编辑器窗格并且是手动的。您可以在此编辑器中显示任何您喜欢的内容。

回答by bikram

Turn Assistant on by navigating to the following in Xcode 11:-

通过导航到 Xcode 11 中的以下内容来打开助手:-

Xcode > Editor > Assistant

Xcode > 编辑器 > 助手

Screenshot

截屏

回答by J. Goce

For Xcode 11.2.1

对于 Xcode 11.2.1

command + option + return

命令 + 选项 + 返回

or

或者

Main Menu -> Editor -> Line View

主菜单 -> 编辑器 -> 线视图

回答by bdskfsdk321dsad3

it is worth noting, that you can also open the assistant editor by alt-clicking the file

值得注意的是,您还可以通过按住 alt 并单击文件来打开助手编辑器