如何让自动完成在 Xcode 中显示一个列表

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

How can I make auto-complete display a list in Xcode

xcodeideautocomplete

提问by MrDatabase

How can I use auto-complete in Xcode like I can in Visual Studio and Eclipse? Specifically in VS and Eclipse auto-complete displays a list of choices... while Xcode just displays a single choice.

如何像在 Visual Studio 和 Eclipse 中一样在 Xcode 中使用自动完成功能?特别是在 VS 和 Eclipse 中,自动完成会显示一个选项列表……而 Xcode 只显示一个选项。

For example Xcode might suggest "myVariable" when I type in "myV". That's fine but what if I have the following objects in the scope of my function: "myInt1" and "myInt2"? Xcode will suggest "myInt1" when I type "myI" but I'd like to have a list. Or it would be great to, say, tab through the various possibilities like in some shells. So typing "myI" would get the suggestions "myInt1" and then pressing tab would change the suggestion to "myInt2".

例如,当我输入“myV”时,Xcode 可能会建议“myVariable”。这很好,但是如果我的函数范围内有以下对象:“myInt1”和“myInt2”怎么办?当我输入“myI”但我想要一个列表时,Xcode 会建议“myInt1”。或者说,像在某些 shell 中那样,通过各种可能性进行选项卡会很棒。因此,键入“myI”将获得建议“myInt1”,然后按 Tab 会将建议更改为“myInt2”。

Cheers!

干杯!

回答by MrDatabase

Press the escape key when auto-complete makes the first suggestion. This will display the list.

当自动完成提出第一个建议时按退出键。这将显示列表。

回答by rogchap

control + spacealso works in the latest Xcode.

control + space也适用于最新的 Xcode。