使用了很久的 Xcode,但是很多常用操作的快捷方式不是很熟悉,今天就在这里简单的总结一下常用的快捷键。(option ---- alt)
一、工程
打开欢迎界面,可创建新的工程:command + shift + 1
退出关闭窗口:command+q,command+w
打开偏好设置:command + ‘,’
控制台的隐藏:command + shift + y
查找:command + shift + option + f
隐藏左边栏:command + 0
缩小:command + option + ‘-'
放大:command + option + ‘+'
文档和参考:command + shift + 0
工程导航器:command + 1
清理工程:command + shift + k
显示/隐藏实用工具面板:command + option + 0
快速帮助:在类或者方法名上执行option + 左键
查看某个类、关键字的信息:选中查看的类或关键字,command + 左键
二、文件
新建项目:command + shift + n
新建文件 :command + n
新建空文件:command + control + n
打开文件:command + o
快速打开: command + shift + o
保存文件:command + option + s
还原到保存状态:command + u
文件跳转栏:control + 6
切换.h和.m文件:command + control + 上/下箭头
三、代码
剪切:command + x
复制:command + c
粘贴:command + v
撤销:command + z
全选:command + a
停止:command + .
注释:command + /
查找:command + f
左缩进:command + [
右缩进:command + ]
左对齐:command + {
右对齐:command + }
运行程序:command + r
搜索下一处:command + g
搜索上一处:command + shift + g
代码首行:command + 上箭头
代码末行:command + 下箭头
添加断点:command + option + b
检查代码确保其正常工作:command + b
四、虚拟机
退出程序 :command + shift + h + h
关闭/弹出键盘:command + k 或者 command + shift + k
屏幕截图:选中模拟器 command + s