随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。
你的呢?
随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。
你的呢?
当前回答
如果你有一个多点触控功能的Mac -使用MultiClutch来映射一些由鼠标手势描述的击键。
我用三个手指向前和向后在文件历史中向前和向后移动(cmd-alt-.),并在.h和.m之间切换。
其他回答
在调试器启动时打开调试窗口 更改图像中显示的调试首选项。 要在每次应用程序运行时清除控制台日志,请检查自动清除调试控制台。
你可以让Xcode在Info上运行预处理器。plist文件:
<key>CFBundleShortVersionString</key> #ifdef DEBUG <string>1.0 (debug)</string> #else <string>1.0</string> #endif
详情见http://developer.apple.com/technotes/tn2007/tn2175.html。
使用类浏览器显示继承的方法
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.
User Scripts菜单中有很多好东西,而且添加自己的脚本也相对容易。例如,我添加了一个快捷方式并将其绑定到cmd-opt—在我的代码中插入注释分隔符和#pragma标记来快速分解文件。
# !/bin/sh Echo -n "//================....================ #pragma mark”
当我点击cmd-opt——时,这些行被插入到我的代码中,光标被预先定位为编辑pragma mark组件,该组件显示在符号弹出框中。
构建成功/失败噪音;从术语:
defaults write com.apple.Xcode PBXBuildSuccessSound ~/Library/Sounds/metal\ stamp.wav
defaults write com.apple.Xcode PBXBuildFailureSound ~/Library/Sounds/Elephant