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

你的呢?


当前回答

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

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

其他回答

当在多个键盘上使用Code Sense时,使用control +来显示可用的补全列表,control +。插入最有可能的补全符,并control + / & shift + control + /在占位符令牌之间移动。所有的键都在键盘的主行下面,这对肌肉记忆有好处。

用alt-向前或向后移动一个完整的单词。使用cmd-alt-向前或向后移动历史记录中的文件。使用cmd-alt-在接口和实现之间切换。

用cmd-=跳转到构建错误列表中的下一个错误。使用cmd-shift-f显示多个Find面板。使用cmd-shift-e切换完整的编辑器可见性。

使用cmd-0跳转到项目选项卡,使用cmd-shift-b跳转到构建选项卡,使用cmd-shift-y跳转到调试选项卡(与操作的关键命令相同,添加了shift)。

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

双击方括号或圆括号,可获得括号与圆括号匹配。

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

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