随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。
你的呢?
随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。
你的呢?
当前回答
事实上,我可以使用Emacs作为我的编辑器,Xcode作为我的构建器/调试器……在我看来,这是两全其美。
其他回答
迅速打开……
命令⌘Shift⇧D 文件>快速打开…
我是Open quick功能的忠实粉丝,它在Xcode 3.1及后续版本中表现得特别好。当你想打开项目或框架中的文件或符号定义时,只需点击键盘快捷键,键入文件或符号名称的位,使用向上箭头↑和向下箭头↓选择正确的结果(如果需要),然后点击返回系键打开文件或导航到符号定义。
在Xcode 4上:
命令⌘Shift⇧o
“快速打开”使用当前单词作为搜索词
此外,直到两分钟前(当schwa在评论中指出它时)我才知道Xcode的一些事情是,如果编辑器的文本插入符号在一个单词中,当Open quick被调用时,这个单词将被用作Open quick搜索词。
Xcode代码格式化…当你想要编写代码时,它是你需要的东西之一吗 可读性和外观良好。
您可以自己格式化代码,也可以使用脚本节省时间。
一个好方法是…使用Uncrustify。在Xcode中的代码格式化中有解释。
当在多个键盘上使用Code Sense时,使用control +来显示可用的补全列表,control +。插入最有可能的补全符,并control + / & shift + control + /在占位符令牌之间移动。所有的键都在键盘的主行下面,这对肌肉记忆有好处。
Cmd-/自动插入“//”进行注释。从技术上讲,敲击键盘的次数相同,但感觉更快……
此外,默认的项目结构是将资源和类文件放在不同的位置。对于大量代码,请创建逻辑组,并将相关代码和xib文件放在一起。在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.