XCode 3.2 常用快捷鍵
羅朝輝(http://m.shnenglu.com/kesalin)
轉(zhuǎn)載請(qǐng)注明出處
shift + command + E 顯示或者隱藏 Editor 窗口。command + [ 左移代碼
command + ] 右移代碼
tab 代碼自動(dòng)完成
Esc 打開(kāi)自動(dòng)完成列表(E表示枚舉類(lèi)型,f表示函數(shù),#表示#define宏,m表示方法,C表示類(lèi))
control + . 不顯示自動(dòng)完成列表而自動(dòng)進(jìn)行推薦值正向循環(huán)
shift + control + . 不顯示自動(dòng)完成列表而自動(dòng)進(jìn)行推薦值反向循環(huán)
control + / 移至下一個(gè)占位符
command + control + s 創(chuàng)建快照
Edit->Edit all in scope 修改局部變量或參數(shù)
Edit->Refactor 全局修改類(lèi)名(但無(wú)法修改注釋中出現(xiàn)的類(lèi)名)
command + shift + D 打開(kāi)文件快速查找對(duì)話框
command + option + 向上箭頭 查看文件的配套文件(如果當(dāng)前查看的為 m 文件,則打開(kāi) h 文件,反之亦然)
command + D 創(chuàng)建書(shū)簽
command + Y 調(diào)試
command + option + P 執(zhí)行到下一個(gè)斷點(diǎn)(相當(dāng)于 VS 下的 F5)
command + shift + O 執(zhí)行到下一步(相當(dāng)于 VS 下的 F10)
command + shift + I 跳入函數(shù)執(zhí)行(相當(dāng)于 VS 下的 F11)
command + shift + T 跳出函數(shù)執(zhí)行
control + F Forward right 左移光標(biāo)
control + B Backward left 右移光標(biāo)
control + P Previous lien 上移光標(biāo)
control + N Next line 下移光標(biāo)
control + A Line head 移至行頭
control + E Line end 移至行尾
control + T Transpose 交換光標(biāo)兩邊的符合
control + D Delete 刪除光標(biāo)右邊的字符
control + K Kill 刪除光標(biāo)所在行中光標(biāo)后的代碼,
control + L 將插入點(diǎn)置于窗口正中。
查看文檔 按住 option 鍵并雙擊選擇的內(nèi)容,可以查找選中字符的文檔
格式化代碼 右鍵菜單,選擇 re-indent selection
折疊代碼, 點(diǎn)擊代碼左邊的焦點(diǎn)列,就可以進(jìn)行代碼的折疊。
添加可讀的標(biāo)記 在代碼中加入 #pragma mark STUFF,#pragma mark - 則是在菜單中插入分割線或在代碼中加入如下 TODO:, FIDME,!!! 或 ???