xcode5使用技巧总结

来源:互联网 发布:ping软件下载 编辑:程序博客网 时间:2024/06/14 13:29

1.常用快捷键

(1).缩进

左缩进 command+[
右缩进 command+]

(2).编辑
control-F: 向右一个字符(forward)
control-B: 向左一个字符(backward)

control-P: 前一行(previous)
control-N: 后一行(next)

control-A: 去行首
control-E: 到行尾(end)

control-T: 调换光标两边的字符(transpose)

control-D: 删除光标右侧字符(delete)
control-K: 删除本行剩余的字符(kill)

Command + / 批量注释或取消注释

(3).搜索
Command + F: 搜索
Command + G: 搜索下一处
Shift + Command + G: 搜索上一处


(4).跳转

ESC  自动提示列表


切换头文件和cpp文件 control + command + 上下箭头键

go back和go forward,就是回到上次编辑的地方 control+command+ 左右箭头


(5).调试
Command + B  编译

Command + R  编译并运行

Command + .  停止

Command + SHIFT + K  清理

Command + Alt + Y   继续(调试中)


F6单步调试、F7跳入,F8继续


2.使用#pragma mark,方便在symbol list中快速检索
注释标记
#pragma mark xxx
分割线
#pragma mark -
二者结合
#pragma mark -xxx