如何在 Xcode 4 中的 .h 和 .m 之间切换

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

How to toggle between .h and .m in Xcode 4

objective-cxcodeios

提问by Ali

Just installed Xcode 4 so far so good, except that Apple changed all the keyboard shortcuts! Anyone know how to toggle between .h and .m?

到目前为止,刚刚安装了 Xcode 4 还不错,只是 Apple 更改了所有键盘快捷键!有人知道如何在 .h 和 .m 之间切换吗?

回答by Anurag

Apple changed all sorts of shortcuts, but to switch between header and implementation, the new shortcut is,

苹果改变了各种快捷方式,但要在标题和实现之间切换,新的快捷方式是,

?+ ?+ /

?+ ?+ /

You can change it back to the previous ?+ ?+ /in Preferences> Key Bindings.

你可以把它改回之前的?+ ?+ / in Preferences> Key Bindings

Look for the Jump to Next Counterpartand Jump to Previous Counterpartcommands.

查找Jump to Next CounterpartJump to Previous Counterpart命令。

If you are working on a big screen, you could use the Assistant layout's split view, and have the .h and .m files side by side.

如果您在大屏幕上工作,您可以使用助手布局的拆分视图,并将 .h 和 .m 文件并排放置。

回答by Jeff Youel

You can also use the 3 finger swipe up or down gesture on a trackpad.

您还可以在触控板上使用 3 指向上或向下滑动手势。

回答by pkamb

The commands we're looking for are in the Navigatemenu bar item.

我们要查找的命令位于Navigate菜单栏项中。

Jump to Next Counterpart

Jump to Next Counterpart

and

Jump to Previous Counterpart

Jump to Previous Counterpart

Once you have the menu item names, these can be assigned to any keyboard shortcut.

一旦您有了菜单项名称,就可以将它们分配给任何键盘快捷键。