文件操作相關(guān)
1.Shift + Command + O 彈出快速查找文件窗口
2.Shift + Comand + j 定位到文件所在目錄杈曲,經(jīng)常配合上面那條快捷鍵。
3.Control + Command + 上\下方向鍵 切換 .m 和.h剪芥。
4.Control + Command + 左\右方向鍵 切換最近打開的文件
5.Command + ` 切換Xcode項目。
6.Command + n 在項目文件列表中新建文件
7.Command + option + n 在在項目文件列表中新建文件夾
8.Command + shift + n 新建工程項目
搜索相關(guān)
1.Shift + Command + f 打開全局搜索
2.Command + f 在類中搜索琴许, enter 匹配下一個税肪, Shift + enter 匹配上一個
光標(biāo)操作相關(guān)
1.Command + 上\下\左\右 光標(biāo)切換到類首,類尾榜田,行首益兄,行尾。
2.option + 左\右 光標(biāo)左右移動一個單詞箭券。
3.shift + command + c 將光標(biāo)焦點調(diào)到調(diào)試控制臺中
4.shift + command + j 光標(biāo)跳到項目列表中
5.command+j 再回車 光標(biāo)從項目列表移到代碼編輯區(qū)
代碼操作
1.option + shift 加上下方向鍵可以選中一行或多行
2.option + shift 加左\右方向鍵選中當(dāng)前行
3.選中一段代碼 Control + i 會自動縮進净捅。
4.option + Command + 左\右方向鍵 折疊\顯示當(dāng)前塊
5.Shift + option + Command + 左\右方向鍵 折疊\顯示當(dāng)前類文件中的所有塊
6.option + Command + [ 選中光標(biāo)當(dāng)前行,并上移一行
7.option + Command + ] 選中光標(biāo)當(dāng)前行辩块,并下移一行
8.Command + ] 當(dāng)前行向右縮進
9.Command + [ 當(dāng)前行向左縮進
10.Control + Command + e 可以批量修改光標(biāo)所在位置的變量蛔六,像這樣
11.Command + / 注釋選中的代碼
12.option + command 編寫類或方法的Description 說明
13.在當(dāng)前類中按Command+a ,然后再Commad+c 再Command+v 類文件的代碼會自動調(diào)整縮進
14.Command + delete 刪除當(dāng)前行
調(diào)試相關(guān)操作
1.Shift + Command + k 清理項目緩存。
2.Command + r 運行項目废亭。
3.Command + . 停止運行項目或編譯
3.Command + b 編譯項目国章。
4.Command + \ 當(dāng)前行加斷點,option + Command + \豆村,新建一個symbolic breakpoint捉腥。
5.Command + k 調(diào)試控制臺清屏。
6.Command + Shift + , 顯示/隱藏 Schemes管理窗體
7.按住option鍵鼠標(biāo)點擊類名或方法名就可以查看到類或方法的Description如下:
8.Command + y: 讓當(dāng)前行斷點活躍或不活躍狀態(tài)(只有當(dāng)前行有斷點才有效果)
窗體相關(guān)
1.Shift + Command + Y 隱藏 \ 顯示 調(diào)試控制臺窗體
2.Control + 1
如圖可以看到所有調(diào)用者你画,導(dǎo)入的文件,被那些導(dǎo)入等等相關(guān)依賴桃漾。還可以找到最近打開的文件Recent Files
3.Control + 6 查看當(dāng)前類的方法列表
4.Command + 0 顯示 \ 隱藏左邊窗體
5.Command + 1,2,3,4,5,6,7,8,9 切換左邊窗體子窗體
6.option + Command + 0 顯示 \ 隱藏右邊窗體
7.option + Command + 1,2 切換右邊窗體子窗體
8.Command+option+回車 切換到雙窗口顯示模式坏匪,直接用鼠標(biāo)點擊項目文件列表中的文件可在第一窗口顯示對應(yīng)的文件,按住 option再用鼠標(biāo)點擊項目文件列表中的文件可在第二個窗口顯示對應(yīng)的文件
9.Command + 回車 從雙窗口模式切換到單窗口模式
10.option + 鼠標(biāo)左鍵點擊Xcode左側(cè)欄的項目文件列表文件后,會切換到雙窗口模式撬统,并在第二個窗口顯示對應(yīng)文件
模擬器相關(guān)
1.Shift + command + H 在模擬器中回到"桌面", 相當(dāng)于在 iPhone上按一下 home 鍵
2.Shift + command + (按兩下 H), 相當(dāng)于在 iPhone上按兩下 home 鍵
3.option+鼠標(biāo)左鍵 在模擬器中進行放大縮小
4.command + s 模擬器截屏
多行編輯
需要借助Sublime Text, 快捷鍵是 Shift + Command + L适滓,退出多行編輯也是Shift + Command + L