随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。

你的呢?


当前回答

Xcode动作的键绑定

我也喜欢“重新缩进”。,则没有默认快捷方式,但您可以从“键绑定”首选项窗格的“文本键绑定”选项卡添加一个。

这本身就能节省时间。只需查找您最喜欢的操作和添加/编辑键盘快捷键!

我发现一个很方便的默认设置是CMD+"和CMD+'来添加/删除垂直分割。按住这些选项,现在你有相同的水平。但如果这些手势不适合你,你可以随时改变它们。

其他回答

使用类浏览器显示继承的方法

Apple's API reference documentation does not show methods inherited from a superclass. Sometimes, though. it's useful to be able to see the full range of functionality available for a class -- including a custom class of your own. You can use the Class Browser (from the Project menu) to display a flat or hierarchical list of all the classes related to a current project. The upper pane on the right hand side of the browser window shows a list of methods associated with the object selected in the browser. You can use the Configure Options sheet to select "Show Inherited Members" to show inherited methods as well as those defined by the selected class itself. You click the small book symbol to go to the corresponding documentation.

放大编辑器

如果窗口同时显示细节视图和编辑器视图,则可以放大编辑器,将编辑器视图展开到窗口的全部高度。(这一点很容易发现,但很多人似乎忽略了它。)

您可以使用以下方法之一来做到这一点:

命令⌘Shift⇧E 查看>放大编辑器 拖动分隔器(在编辑器之间) 窗口和上面的文件列表) 向上。

在拆分窗口时按住“选项”以垂直而不是水平拆分窗口。

Cmd + ~(波浪号-看起来很奇怪的按钮…)

在任何打开的Xcode窗口之间切换-也当多个项目打开时。

完整的快捷方式列表可以在这里找到:http://iphonehuston.blogspot.com/2009/08/shortcuts-for-xcode.html