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

你的呢?


当前回答

CTRL + Alt +⌘+ r清除日志

其他回答

Xcode代码格式化…当你想要编写代码时,它是你需要的东西之一吗 可读性和外观良好。

您可以自己格式化代码,也可以使用脚本节省时间。

一个好方法是…使用Uncrustify。在Xcode中的代码格式化中有解释。

⌘命令+双击符号:跳转到符号的定义。

“选项”+双击符号:在符号的“文档”中查找文本。(只有当你安装了他们符号的Doc Set时才有效。)

收藏夹栏:

收藏夹栏就像你在Safari中存储收藏夹一样。我经常用它来存储我现在正在使用的文件的快捷方式(你可以通过拖拽来实现)。一般来说,当我处理一个大型或不熟悉的项目时,这更有用。

要显示收藏夹栏,请选择以下菜单选项:

查看>布局>显示收藏栏

Cmd+Option+O to open a file in a separate window. Can configure Tab to always indent. I frequently use it to indent an entire file. Ctrl+Arrow keys to move between camel case words. If you have OneTwo, you can move from One to Two with Ctrl+Right arrow. You can use emacs bindings, there's even kill ring! I use the Ctrl+w and Cmd+C together when I need to copy two different pieces of text. In the documentation browser, you can restrict your searches to a particular library, e.g., just iOS 4.2 library. This helps me focus on API available only on a particular iOS/Mac version of the SDK. Cmd+Shift+A to build and analyze.

在打开的文件之间来回导航: ⌥⌘← ⌥⌘→

获取Colin Wheeler的完整Xcode键盘快捷键列表(PDF或PNG格式)。把它打印出来,放在显眼的地方(我把它贴在屏幕旁边的墙上)。

编辑: Xcode 3.2的更新版本

编辑2: Xcode 4的更新版本