I’m new to Xcode and found something frustrating. I select a few lines of code and comment them out. for ex.
// NSString* u = __txtUsername.text;
// NSString* p = __txtPassword.text;
then I may re-indent the code and the commented code goes like below
// NSString* u = __txtUsername.text;
// NSString* p = __txtPassword.text;
now if I try to uncomment the commented code Xcode produces something like below
// // NSString* u = __txtUsername.text;
// // NSString* p = __txtPassword.text;
in fact instead of removing // it adds more // at the beginning and removing // from commented re-indented code is really frustrating.
Is there any solution to that or I’ve made something ridiculously?
You’re correct, Xcode is stupid. If you get in this situation, keep hitting cmd-[ to bring the text all the way to the start of the line, then uncomment and it should work. Why Xcode doesn’t just remove the first instance of // on a line is beyond me.