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

你的呢?


当前回答

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

其他回答

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

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

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

Credit:在Xcode中排序文件。

Xcode中的类浏览器!通过按shift +⌘+ c实现。您可以缩小范围,仅显示您的活动项目。只要您只想浏览类层次结构,它就会为您提供一个不那么混乱的视图。

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

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

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

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.