天天看點

XCode實作注釋所選行/**/功能

首先運作:

<span style="font-family:microsoft yahei;font-size:14px;">git clone https://github.com/flexih/xcode-ccomment</span>  

用xcode打開代碼 > build > 成功後restart xcode

打開後,使用快捷鍵control + cmd + / 對多行代碼進行注釋。

如果想修改快捷鍵改成其他,例如改成和eclipse一樣的shift + cmd + / 則要修改代碼:

1、導入代碼到xcode

2、打開ccomment.m line74

[actionmenuitem setkeyequivalentmodifiermask:nscontrolkeymask | nscommandkeymask];

修改為

[actionmenuitem setkeyequivalentmodifiermask:nsshiftkeymask | nscommandkeymask];

3、重新開機xcode

繼續閱讀