如何在 Xcode 中向后导航?

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

How can I navigate backwards in Xcode?

xcodekeyboard-shortcuts

提问by MrDatabase

In Visual Studio I can navigate backwardsby pressing Ctrl+ -. This is very useful when checking out the definition of a function and then immediately going back to the code I was working on.

在 Visual Studio 中,我可以按+向后导航。这在检查函数的定义然后立即返回到我正在处理的代码时非常有用。 Ctrl-

How can I do this in Xcode? (I'm using version 3.1.2)

我怎样才能在 Xcode 中做到这一点?(我使用的是 3.1.2 版)

采纳答案by Quinn Taylor

Xcode 3.1.x is admittedly a bit weak in this respect. Happily, the navigation @zoulmentions (The back/forward arrows in the header bar, or ??← and ??→) is significantly improved in Snow Leopard, and should provide the finer-grained navigation you're hoping for. Sorry there's not an immediate solution, but hopefully it helps to know that a fix is coming...

Xcode 3.1.x 在这方面确实有点弱。令人高兴的是,@zoul提到的导航(标题栏中的后退/前进箭头,或 ??← 和 ??→)在 Snow Leopard 中得到了显着改进,应该提供您希望的更细粒度的导航。抱歉,没有立即解决方案,但希望知道修复即将到来会有所帮助...

回答by aslisabanci

*Writing this if people using Xcode 4 need the answer for their versions:

*如果使用 Xcode 4 的人需要他们版本的答案,请写下这个:

In Xcode 4 preferences, it's configured to be ^+ ?+ (control-command-left arrow) to navigate back and ^+ ?+ (control-command-right arrow) to navigate forwards.

在Xcode 4个偏好,它的构成为^+ ?+ (控制指令左箭头)导航回和^+ ?+ (控制指令右箭头)向前导航。

回答by zoul

There's a Cmd+ Alt+ that goes back in editor history, and conversely Cmd+ Alt+ that browses forward. (Not sure if this is exactly what you are looking for.) It goes well with Cmd+ Alt+ that switches between the header and the implementation file.

有一个Cmd+ Alt+ ,可追溯到在编辑器的历史,相反Cmd+ Alt+是向前浏览。(不知道这正是你所寻找的。)这与顺利Cmd+ Alt+的头和实现文件之间切换。

回答by stefanB

There are small arrows on top left corner of editor pane in Xcode.

Xcode 编辑器窗格的左上角有小箭头。

回答by Jeffrey Wear

On Macs with multitouch trackpads, you can also use three-finger-swipe left and right to navigate through the file history.

在配备多点触控板的 Mac 上,您还可以使用三指左右滑动来浏览文件历史记录。

Also re: MrDatabase's comments on stefanB's response, if you've been actually jumping from definition to definition (by, for instance, holding down Command and clicking on a symbol) as opposed to just scrolling, I believe that the file history should track navigation even within the same file... perhaps that was a change in Xcode 3.1.3.

另外:MrDatabase 对 stefanB's response的评论,如果您实际上一直在从定义跳到定义(例如,通过按住 Command 并单击符号)而不是仅仅滚动,我相信文件历史记录应该跟踪导航即使在同一个文件中......也许这是 Xcode 3.1.3 中的一个变化。

回答by Abhay Phougat

Control + Command + Arrow keys work for me.

Control + Command + 箭头键对我有用。

回答by John Weldon

Other than the 'complete shortcut list', I don't know.

除了“完整的快捷方式列表”,我不知道。

You can find previous with ⇧⌘G, but that's not really what you were after I think.

你可以找到 previous with ⇧⌘G,但我认为这并不是你真正想要的。

回答by Nhat Dinh

In Xcode 8.3.3you can use: (OS: Mac 10.13)

Xcode 8.3.3 中,您可以使用:(操作系统:Mac 10.13)

Control+ Command+ or

Control+ Command+

Hope this help!

希望这有帮助!