I just installed Xcode 4 and the opening brace of the auto generated functions is on a new line.
For example :
- (void)dealloc
{
[_window release];
[super dealloc];
}
I'd like to have the opening brace on the same line like it was in Xcode 3 :
- (void)dealloc {
[_window release];
[super dealloc];
}
Can someone help me ?
Thanks.
MarkC's answer has the right idea, but <Jedi> these aren't the templates you're looking for </Jedi>.
The templates you need to edit are in either
or
depending on which platform you're targeting.
All the template code that XCode 4 uses to create new class files is in /Developer/Library/Xcode/Templates/File\ Templates/Cocoa/Objective-C\ class.xctemplate
Just edit those templates to suit your coding style and you are good to go.
You could try using an application called Snippet Edit that allows you to easily edit all of the supplied code snippets. You will need to be using Xcode v4.3 or later though if you wish to use it.
The application can be found at http://cocoaholic.com/snippet_edit/
Don't edit those templates directly! Apple usually automatically deletes them when you upgrade to next version of Xcode...
Instead, you want to copy/paste them into:
e.g.:
...and then edit them there. Xcode knows it should look there for your custom versions, and Apple will leave the contents of your home directory alone.