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

你的呢?


当前回答

双击方括号或圆括号,可获得括号与圆括号匹配。

其他回答

要“设置下一个语句”,只需将红色指令指针拖到下一行执行。(源)

Xcode支持文本宏,可以通过编辑菜单末尾的插入文本宏菜单调用。它们也可以使用Code Sense (Xcode的代码补全技术)来调用。

例如,键入键序列pi m control-period将插入#import "file"到你的代码中,file作为一个可编辑的标记,就像代码完成一样。

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

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.

看看一个关于“在Xcode中变得高效”的视频:becoming-productive-in- Xcode

切换到头文件/源文件

选项命令⌘向上箭头↑ 查看>切换到头文件/源文件

在。m和。h文件之间切换。

在Xcode 4中,这是ctrl⌘向上箭头↑