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

你的呢?


当前回答

我发现使用快捷方式来构建/清理和运行你的项目真的节省了我一些时间:

Cmd-R:构建并运行 Cmd-Y:构建和调试 Cmd-Shift-Enter:停止运行项目 Cmd-Shift-K:清洁构建

其他回答

使用xcodebuild命令行在共享构建机器上进行干净的构建:

cd project_directory
xcodebuild -configuration Release -alltargets clean
xcodebuild -configuration Release -alltargets

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

ctrl⌘T

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

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.

使用AppKiDo浏览文档。

在Xcode中使用Accessorizer来完成一堆单调、重复的任务。

在Xcode的Groups and Files窗格中选择Group,然后Edit > Sort by > Name。

您可能希望在组的上下文菜单中找到它,但它不在那里。

Credit:在Xcode中排序文件。