iOS - 跳转到 Xcode 9 定义的快捷方式?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/44497436/
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
iOS - Shortcut for jumping to definition in Xcode 9?
提问by Bikram Thapa
In previous Xcode version , I could jump to definition with simple Cmd + clickon that method/variable . But in Xcode 9, I feel uncomfortable to jump to definition .
在以前的 Xcode 版本中,我可以通过简单的Cmd + 单击该方法/变量跳转到定义 。但是在 Xcode 9 中,我觉得跳转到 definition 感到不舒服。
Does anyone has a better solution for jumping to definition in Xcode 9 ?
有没有人有更好的解决方案来跳转到 Xcode 9 中的定义?
I am tired of selecting options from dropdown list.
我厌倦了从下拉列表中选择选项。
回答by user8315745
Ashish and Ghulam's answers were great but it still kinda bugged me that things had changed and I couldn't jump to definition as before. Then I found this...
Ashish 和 Ghulam 的回答很好,但事情已经改变了,我不能像以前那样跳到定义上,这让我有点不安。然后我发现了这个...
Xcode9Beta2-Preferences->Navigation->Command-click on Code:->Jump To Definition:
Xcode9Beta2-Preferences->Navigation->Command-点击代码:->跳转到定义:
回答by Ghulam Rasool
回答by dip
There is short cut displayed on drop down menu, just use-
下拉菜单上显示了快捷方式,只需使用-
1. Control, Command and left mouse button
1. 控制、命令和鼠标左键
OR
或者
2. Command plus Right Mouse Click
2. 命令加鼠标右键
instead of command left mouse button.
而不是命令鼠标左键。
回答by Paresh Patel
In Xcode 9 Beta, you can go definition by Cmd + Right Click
在 Xcode 9 Beta 中,您可以通过Cmd + 右键单击来定义
回答by Alex
Standard hot key for jump to definition is ctrl+cmd+j. Set cursor to the class/method you are interested in and press this buttons to switch to declaration. Also you can try to press ctrl+opt+cmd+j. In this case definition will be opened in assistant editor
跳转到定义的标准热键是 ctrl+cmd+j。将光标设置到您感兴趣的类/方法,然后按此按钮切换到声明。您也可以尝试按 ctrl+opt+cmd+j。在这种情况下,定义将在助理编辑器中打开
回答by Shaked Sayag
In Xcode 9 both of these work:
在 Xcode 9 中,这两项工作:
? + Right Click
? + 右键单击
OR
或者
?? + Click
?? + 点击
回答by CodeNoob
If dont like to use mouse click(I certainly don't like) you could use
如果不喜欢使用鼠标点击(我当然不喜欢)你可以使用
Command + Ctrl + J
命令 + Ctrl + J
回答by Mihai Costiug
I don't know how Cmd + Option + Left Click worked for you guys, but the shortcut (at least for me) was Cmd + Ctrl + Left Click. I've tried on both Apple keyboard and MacBook keyboard and this is the one that did it.
我不知道 Cmd + Option + Left Click 如何为你们工作,但快捷方式(至少对我而言)是Cmd + Ctrl + Left Click。我在 Apple 键盘和 MacBook 键盘上都试过,这就是做到了。
回答by vadian
回答by Ashish Verma
In Xcode 9 Beta, it has been changed to Cmd + Ctrl + Left Click.
在 Xcode 9 Beta 中,它已更改为Cmd + Ctrl + Left Click。