随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。
你的呢?
随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。
你的呢?
当前回答
使用类浏览器显示继承的方法
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⇧D 文件>快速打开…
我是Open quick功能的忠实粉丝,它在Xcode 3.1及后续版本中表现得特别好。当你想打开项目或框架中的文件或符号定义时,只需点击键盘快捷键,键入文件或符号名称的位,使用向上箭头↑和向下箭头↓选择正确的结果(如果需要),然后点击返回系键打开文件或导航到符号定义。
在Xcode 4上:
命令⌘Shift⇧o
“快速打开”使用当前单词作为搜索词
此外,直到两分钟前(当schwa在评论中指出它时)我才知道Xcode的一些事情是,如果编辑器的文本插入符号在一个单词中,当Open quick被调用时,这个单词将被用作Open quick搜索词。
你可以对Xcode处理代码格式的方式进行很多调整,但前提是你要通过命令行更改设置。我编写了一个小程序,可以让你根据自己的喜好调整它们。享受:)
Xcode格式化选项
双击方括号或圆括号,可获得括号与圆括号匹配。
⌘'来正确格式化(重新缩进)您的代码
编辑:显然重缩进功能(编辑>格式>重缩进)没有默认的快捷方式。我想我很久以前就分配了一个(在Preferences > Key bindings中),甚至不记得了。抱歉误导你了。
Command⌘alt shift T:在项目树中显示当前编辑的文件。