Saturday, October 1, 2016

How to Comment Multiple Lines in XCode 8

Recently Apple released new version of XCode. This revised IDE includes Swift 3.  This new version of XCode has a new look, which I liked a lot.
But after updating it I was not able to comment multiple code lines, which was very frustrating. First I thought may be the shortcut key has been changed in this new version. So I checked from XCode menu Editor ---> Structure ---> Comment Section. But this option was disable. 


To enable this option first of all, after updating the XCode restart your Mac. Then reopen XCode check Comment Section option. If still this option is disabled then you have to go for this second step.

Open your terminal. In there run "suo/usr/libexec/xpccachectl". After running this command restart your Mac again. After that you can see the Comment Section enabled. Now you can comment multiple lines with the shortcut key (⌘ + /).

No comments:

Post a Comment