XCode常用操作

實(shí)用技巧

  1. 切換頭文件和m.文件,很實(shí)用
    Command + control+ 上下箭頭鍵
  2. go back 回到你上次打開(kāi)的頁(yè)面。
    control+command+ 左箭頭
  3. go forward 回到你前面打開(kāi)的頁(yè)面
    control+command+ 右箭頭

操作文件

  • 新建項(xiàng)目 command+shift+n
  • 新建文件 command+n
  • 新建空文件 command+control+n
  • 打開(kāi) command+o
  • 關(guān)閉窗口 command+w
  • 保存所有文件 command+option+s
  • 還原到保存時(shí)狀態(tài) command+u

編輯代碼

  1. 代碼縮進(jìn)

    • 左縮進(jìn) command+[
    • 右縮進(jìn) command+]
  2. 代碼編輯

    • control-A: 去行首
    • control-E: 到行尾(end)
    • control-T: 調(diào)換光標(biāo)兩邊的字符(transpose)
    • control-D: 刪除光標(biāo)右側(cè)字符(delete)
    • control-K: 刪除本行剩余的字符(kill)
  3. 搜索

    • Command + F: 搜索
    • Command + G: 搜索下一處
    • Command + Shift + G: 搜索上一處
    • 項(xiàng)目中查找 command+shift+F
    • 查找替換 command+control+f
  4. 其他

    • open某文件:command+o
    • 在新窗口中打開(kāi) command+option+o
    • 重構(gòu) command+shift+j (選中方法名)
    • 插入斷點(diǎn):command+豎線
    • go to line command+l
    • 折疊所有方法:command+option+shift+左箭頭
    • 展開(kāi)所有方法:command+option+shift+右箭頭
    • 折疊當(dāng)前方法:command+option+左箭頭
    • 展開(kāi)當(dāng)前方法:command+option+右箭頭
    • 收起左邊工具欄:command+數(shù)字0
    • 關(guān)閉全部斷點(diǎn):command+Y
    • Bulid Results command+shift+b
    • Bulid command+b
    • Clean command+shift+k
    • 注釋 command+/
    • 文件首行 command+上箭頭
    • 文件末 command+下箭頭
    • 行首 command+左箭頭
    • 行末 command+右箭頭
    • 上一單詞 option+左箭頭
    • 下一單詞 option+右箭頭
    • 刪除前一單詞 option+delete
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • xcode常用快捷鍵操作: 新建項(xiàng)目 command+shift+n 新建文件 command+n 新建空文件 c...
    沐陽(yáng)風(fēng)色閱讀 2,203評(píng)論 0 1
  • 剛開(kāi)始用Xcode是不是發(fā)現(xiàn)以前熟悉的開(kāi)發(fā)環(huán)境的快捷鍵都不能用了?怎么快捷運(yùn)行,停止,編輯等等、都不一樣了??焖俚?..
    我真的不是狼人閱讀 666評(píng)論 0 1
  • 參考:http://www.cnblogs.com/langtianya/p/3888157.html一、關(guān)于運(yùn)行...
    iOS_Developer閱讀 3,245評(píng)論 0 1
  • ===============xcode相關(guān)================關(guān)于xcode 可設(shè)偏好設(shè)置 com...
    我是大龍啊閱讀 958評(píng)論 0 51
  • 1.Xcode IDE概覽 說(shuō)明:從左到右,依次是“導(dǎo)航窗格(Navigator)->邊列(Gutter)->焦點(diǎn)...
    小地閱讀 5,460評(píng)論 0 9

友情鏈接更多精彩內(nèi)容