随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。
你的呢?
随着大量的Xcode新手的涌入,我相信会有很多Xcode的技巧和技巧可以分享。
你的呢?
当前回答
使用类浏览器显示继承的方法
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.
其他回答
当在多个键盘上使用Code Sense时,使用control +来显示可用的补全列表,control +。插入最有可能的补全符,并control + / & shift + control + /在占位符令牌之间移动。所有的键都在键盘的主行下面,这对肌肉记忆有好处。
我不知道是否每个人都知道这一点,但当我了解到我可以使用“代码折叠”并通过单击想要折叠的代码附近的灰色区域来隐藏我不想查看的嵌套函数时,我很高兴。
很难解释……
通过命令行控制Xcode的文本编辑器:xed
> xed -x # open a new untitled document
> xed -xc foo.txt # create foo.txt and open it
> xed -l 2000 foo.txt # open foo.txt and go to line 2000
# set Xcode to be your EDITOR for command line tools
# e.g. for subversion commit
> echo 'export EDITOR="xed -wcx"' >> ~/.profile
> man xed # there's a man page, too
放大编辑器
如果窗口同时显示细节视图和编辑器视图,则可以放大编辑器,将编辑器视图展开到窗口的全部高度。(这一点很容易发现,但很多人似乎忽略了它。)
您可以使用以下方法之一来做到这一点:
命令⌘Shift⇧E 查看>放大编辑器 拖动分隔器(在编辑器之间) 窗口和上面的文件列表) 向上。
我发现使用快捷方式来构建/清理和运行你的项目真的节省了我一些时间:
Cmd-R:构建并运行 Cmd-Y:构建和调试 Cmd-Shift-Enter:停止运行项目 Cmd-Shift-K:清洁构建