Xcode常用快捷键

276 阅读1分钟

Xcode

  • 运行:command + r
  • 编译:command + b
  • 停止:command + .
  • 工程导航如图左到右:command + 1~9

image.png

  • 快速打开/隐藏实用面板
  • command + 0

image.png

  • command+option+0

image.png

  • command+shift+y

image.png

  • command + f(在类中搜索)

  • command + g(搜索下一处)

  • command + shift + g(搜索上一处)

  • 快速跳转到类的特定行:command + l

image.png

  • 快速查找打开类:command + shift + o

image.png

  • 快速定位当前类在项目文件中的位置:command + shift + j

image.png

  • 类文件 .h 和 .m 之间切换:control+command + ↑/↓

  • 查看Apple文档:command + shift + 0

  • 清除工程:command + shift + k

  • 清除控制台打印信息:command + k

  • 当前类/方法/变量查找:control + 6

image.png

  • 光标操作

    • control + f:向右一个字符
    • control + b:向左一个字符
    • control + p:前一行
    • control + n:后一行
    • control + a:去行首
    • control + e:去行尾
    • control + t:调换光标两边的字符
    • control + d:删除光标右侧字符
    • control + k:删除本行剩余的字符
  • 回到上一个/下一个打开的页面:control + command + ←/→