Xcode throws all kinds of errors when I insert a line break in a string. For example, this fails:
if (newMaximumNumberOfSides > 12) { NSLog(@"Invalid maximum number of sides: %i is greater than the maximum of 12 allowed.", newMaximumNumberOfSides); }
But it works:
if (newMaximumNumberOfSides > 12) { NSLog(@"Invalid maximum number of sides: %i is greater than the maximum of 12 allowed.", newMaximumNumberOfSides); }
I would prefer the first one because it is cleaner to watch (short lines), but the code breaks. What is the best way to handle this? (Subquestion: does this refer to any of the syntax instructions? I searched all my books for "line breaks" with no effect.)
source share