您的位置:首页 > 其它

[置顶] Xcode 快捷键常用、技巧操作走一波

2018-03-01 16:11 507 查看
1.工程导航器:Command+1
快速浏览代码、图片以及用户界面文件。



2.显示/隐藏导航器面板:Command+0



3.显示/隐藏实用工具面板:Command+Option+0



4.Text Editing
command+[/]:向前/向后缩进(Shift Left/Right)

option+command+[/]:将当前光标所在行代码上移/下移一行(Move Line Up/Down)
5.Code Folding
option+command+←/→:折叠当前代码块,包括@interface …@end、@implementation …@end
option+shift+command+←/→:折叠该文件内所有代码块(方法/函数:{ Methods&Functions })
control+shift+command+←/→:折叠当前注释块(/*Comment Blocks*/)
shift+command+J:在项目导航中定位当前编辑其中打开的文件(Reveal in Project Navigator)。
command+L:跳转到指定行。
shift+command+O:Open Quickly,快速全局查找文件、符号,非常常用!
command+点击Editor中选中的符号:跳转到符号定义(jump to definition)。

control+command+J:跳转到指定符号的定义处或实现处(Go to Declaration/Definition)。有时工程正在Loading、Indexing或Processing files时,“command+点击”无法响应,此时可试试control+command+J。
6.Find & Replace
command+F:当前文件查找。
shift+command+F(command+3):在Find Navigator中全局查找。
Find:可指定查找内容(Text/References/Definitions/Regular Expression);
放大镜:下拉可查看最近查找历史;
In Project:查找范围(可指定Group);
Text:匹配规则(可指定Containing,Matching,Starting with,Ending with);
Case:是否区分大小写(可指定 Matching/Ignoring)。
对于查找出来的结果可以delete删除非预期干扰结果条目
Replace:逐个替换;
All:所有替换;

Done:替换完成。
7.运行调试
7.1>Console
shift+command+Y:显示控制台(Show/Hide the debug area)
shift+command+C:激活聚焦控制台,光标定位到控制台呈可输入状态
command+K:清除控制台(Debug->Debug Workflow->Clear Console)
7.2>Breakpoint
command + \:当前行设置/取消断点;通过鼠标点击边列中的蓝色断点来启用/禁用当前行断点。
command + Y:全局激活或禁用所有的断点,激活进入调试模式(此时断点蓝色可见)。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: