XCode 显示函数参数热键

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

XCode Show Function Parameters Hotkey

objective-cxcodehotkeys

提问by Mr. Smith

One of the few things I haven't figured out how to do in XCode that I could do in Visual Studio is list the parameters of a function. I've Googled this a few times now, and still haven't found an answer.

我还没有想出如何在 XCode 中做而我可以在 Visual Studio 中做的几件事之一是列出函数的参数。我已经在谷歌上搜索了几次,但仍然没有找到答案。

If I start typing out, for example round(I get a list of the parameters and its return type. However, if I already typed out the code

例如,如果我开始输入,round(我会得到一个参数列表及其返回类型。但是,如果我已经输入了代码

x = round(y);

and I cursor over to it, I don't know how to show parameter info without retyping it. Anyone know how the hotkey for this?

我将光标移到它上面,我不知道如何在不重新键入的情况下显示参数信息。有谁知道这个的热键如何?

采纳答案by Mr. Smith

Just discovered Option + Escapeby browsing through the XCode Preferences Hotkeys section. It actually lists the parameter info in a tooltip (no other hotkey I've seen so far does this!), but isn't quite as friendly as Visual Studio's Ctrl+Shift+Space function. For instance, the text selection cursor (caret) must be on the function name (not on a parameter to that function).

刚刚通过浏览 XCode 首选项热键部分发现了Option + Escape。它实际上在工具提示中列出了参数信息(到目前为止我还没有看到其他热键可以这样做!),但不如 Visual Studio 的 Ctrl+Shift+Space 功能那么友好。例如,文本选择光标(插入符号)必须位于函数名称上(而不是该函数的参数上)。

Having explored the XCode hotkeys exhaustively, I'm going to assume that this is the best it gets in XCode.

在详尽地探索了 XCode 热键之后,我将假设这是 XCode 中最好的。

回答by Bijou Trouvaille

Control + Command + Shift + /is the keyboard equivalent of Option + click mentioned in other answers

Control + Command + Shift + /是等价于其他答案中提到的 Option + click 的键盘吗

回答by Raptor

Command + clickthe function will navigate you to the function definition, while Option + clickbrings up tooltip of function definition.

Command + 单击函数将导航到函数定义,而Option + 单击会显示函数定义的工具提示。