Uncommenting code in xcode just adds more comments
When commenting out a piece of code in xcode
//code
If you click comment again it adds more comme开发者_如何转开发nts
////code
does anyone know how to prevent this?
It looks like a bug to me .... if you do command + ] it gets rid of the tabs.. The tabs are the ones causing the issue. Xcode sees the tabs and adds more comment lines. so do command +] twice or until all the tabs are gone. and then you can remove the comments using the command+/ (comment selection command)
When you "click comment again" you have to have the //
selected (and optionally the rest of the line).
Usually when you comment the first time Xcode will select the text such that pressing the comment shortcut again will uncomment.
Is nothing selected after you comment the first time?
精彩评论