1.常用快捷鍵
Mac鍵盤圖標(biāo)與對(duì)應(yīng)快捷按鍵
?——Command (?)
? ——Control
?——Option (alt)
?——Shift
?——Caps Lock
2.常見的快捷鍵組合
command + R——運(yùn)行
command + B——編譯
command + .——停止
command + 1~8——分別對(duì)應(yīng)工程導(dǎo)航從左到右
3.炫酷的快捷鍵組合
command + L——快速跳轉(zhuǎn)到類的指定行
command + shift +0——查看Apple文檔
command + option + ← / command + option + →——收放方法體
整體位移代碼
選中的代碼 + command + [ ——向左位移
選中的代碼 + command + ]—— 向右位移
選中的代碼 + command + option + [——向上位移
選中的代碼 + command + option + ]——向下位移
command + K——清除控制臺(tái)打印信息
4.Xcode窗口
Xcode 的界面分四部分:
左邊的導(dǎo)航部分 右邊的工具欄 底部的調(diào)試區(qū) 和中間的代碼邊界區(qū)
導(dǎo)航欄:
com + 0——打開和隱藏導(dǎo)航欄
com + 1-8——從左到右分顯示導(dǎo)航欄的不同部分
com + shift + f ——快速打開全局搜索
右邊的工具欄:
com + option + 0 ——顯示的隱藏工具欄
com + option + 1 - 5——從左到右顯示工具欄的不同部分
底部的調(diào)試區(qū):
com + shift + y——顯示隱藏調(diào)試區(qū)
代碼編輯區(qū):
com + shift + o——快速打開文件
ctrl + 6 ——查看 + 定位到函數(shù)的位置
option + 單擊文件名——顯示assistant editor
com + enter——關(guān)閉assistant editor
com + T——打開標(biāo)簽頁(yè)
com + shift + 】——切換到下一個(gè)標(biāo)簽頁(yè)
com + shift + 【 ——切換到上一個(gè)標(biāo)簽頁(yè)
5.storyboard 快捷鍵
com + option + =——更新選中View的frame
com + =——當(dāng)前試圖的frame 根據(jù)子視圖更新size(如果有圖片根據(jù)圖片的原始大小)
按住option鍵+ 移動(dòng)鼠標(biāo)到View之間,會(huì)顯示View之間的距離