I switched over to Xcode 4 while it was in beta, and I have mostly been editing existing code so haven't really considered this much until now...
Apple's file templates seem to have switched convention for coding methods. As an example, a pre-Xcode 4 dealloc
method looked like this:
- (void)dealloc {
[super dealloc];
}
In Xcode 4, they now use this style:
- (void)dealloc
{
[super dealloc];
}
As an avid perfectionist and irritable person, this has me quite miffed! I was brought up on the previous style in Xcode itself, and I'm now finding myself going through every template each time I create one to put the brackets back in the right place!
Please tell me this is a default option that I can change... or will I have to change my own coding style to match (or worse still, "learn to live with it" [shudder]!).
I've never been able to get to grips with Xcode indentation. Instead I've ended up with a separate script that calls uncrustify (for ObjC) or indent (for plain C) to clean up the code before each commit. That way my coding style (the only sensible one, naturally) is consistently (fanatically?) enforced at all times.
This also catches other typical Xcode annoyances like trailing whitespace, which a reasonable code editor would strip at save time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With