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

你的呢?


当前回答

放大编辑器

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

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

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

其他回答

事实上,我可以使用Emacs作为我的编辑器,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.

右键单击函数中的变量,然后单击edit all in scope。自从我发现了这个,我就一直在用它。

ctrl⌘T

构建成功/失败噪音;从术语:

defaults write com.apple.Xcode PBXBuildSuccessSound ~/Library/Sounds/metal\ stamp.wav
defaults write com.apple.Xcode PBXBuildFailureSound ~/Library/Sounds/Elephant

在PyObjC中,你可以为符号下拉列表做类似的#pragma标记:

#马克:Foo

and

#马克:-