随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。
你的呢?
随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。
你的呢?
当前回答
我刚刚发现了如何改变文本宏中使用的缩进行为:
例如,如果你和我一样,不喜欢这个:
if (cond) {
code;
}
但我更喜欢这样:
if (cond)
{
code;
}
然后你可以通过在终端中设置以下默认值来全局(所有语言)更改此设置:
defaults write com.apple.Xcode XCCodeSenseFormattingOptions -dict-add BlockSeparator "\n"
这个问题已经困扰我很多年了,我希望其他人也会感兴趣。
这个特性的文档可以在Xcode用户默认参考中找到
其他回答
在调试器启动时打开调试窗口 更改图像中显示的调试首选项。 要在每次应用程序运行时清除控制台日志,请检查自动清除调试控制台。
看看一个关于“在Xcode中变得高效”的视频:becoming-productive-in- Xcode
获取Colin Wheeler的完整Xcode键盘快捷键列表(PDF或PNG格式)。把它打印出来,放在显眼的地方(我把它贴在屏幕旁边的墙上)。
编辑: Xcode 3.2的更新版本
编辑2: Xcode 4的更新版本
使用类浏览器显示继承的方法
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.
自动完成键盘快捷键
选项卡⇥或控制⌃/:选择下一个自动完成参数。
Shift: Tab⇥或Shift: Control⌃/:选择之前的自动完成参数。
Escape⎋:显示自动完成弹出列表。