I have a particular format that I like to put my code in, and every time I create a new UIViewController
(or any other class for that matter), the same auto-generated code from Apple is put in, and I have to spend the 2 minutes cleaning it up to be formatted the way I want it before I can even start.
I was wondering if there was a way to set it in Xcode to add in my version of the formatted code, so that I don't have to waste my time re-formatting. Thanks for the help!
You will find all the templates that Xcode uses when you create new files in /Developer/Library/Xcode/Templates. Have a look in their, you should be able to figure out how it all words easily.
Hope it helps.
XCode 4 changes how templates work, and where templates go, so be careful following instructions unless they refer to XCode 4. You can find a few template examples, and the paths to where they go in my XCode4 customization repository:
https://github.com/KiGi/XCode4Customization
The paths where the system templates live is:
/Developer/Platforms/iPhoneOS.platform/Developer/Library/ Xcode/Templates/File Templates
Don't change those, copy and modify in your own library directory:
~/Library/Developer/Xcode/UserData/File Templates
Those paths are also in the "WhereToPlaceFiles" RTF file on github.
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