今天要來跟大家分享一些我平常很常使用的xcode快捷鍵,可以讓你在編寫程式的時候省很多時間哦,當然一定還有很多好用的快捷鍵,但我只列出我最常用了推薦給大家。
commend + R 執行commend + B 編譯 buildcommend + . 停止commend + shift + K 清理快取commend + shift + O 快速尋找commend+ A 全選+ ctrl + i 自動排版程式碼commend + option + [ or ] 上下移動該行程式碼commend + N 新增檔案commend+option+N 新增資料夾shift + tab 往左縮排commend + 左/右箭頭 跳到滑鼠游標該行程式碼首/尾commend + shift + 左/右箭頭 全選該行程式碼option + 左/右箭頭 跳到滑鼠游標的單字首/尾Ctrl + commend + E Refactor All In Scope 重構所有跟點選一樣的單字ctrl+command+ 左箭頭 / 右箭頭 回到你 前面/後面 最近開啟的頁面commend + shift + L 開啟 snippets,新增快捷程式碼ctrl + commend + space 輸入表情符號ctrl+3 開啟最近開的三個頁面ctrl+6 查詢該檔案內所有func 直接打字 就可以搜尋function. (jump bar)ctrl+shift+上/下鍵 可增加多行光標對該單詞點 右鍵>refactor>rename 重構variables的名稱圈選程式碼>右鍵>create code snippets 程式碼片段儲存右鍵>jump to definition 跳到定義commen + shift + enter 執行程式
option+左鍵點選單字 查看該單字的型別type如果你覺得你電腦容量快不夠了感覺xcode佔了你很多空間,在terminal打
xed . open the workspacexcrun simctl delete unavailable to remove any old simulators that are no longer supported. 會省很多空間commend+K 打開/收起鍵盤commend+shift+D to highlight it in the debug navigator.