When I create an NSObject subclass, I always get an empty implementation. There are some things I always put in my code like pragma marks and -dealloc methods. I prefer to just delete stuff that I don't need over writing it with typos from scratch every time I need it. I need -dealloc and -init almost always, but they don't ship with the default template. Is there a way to customize what's in there?
Take a look at this article that describes how to create user defined templates in xcode.
I've also created a description on how to do this, this tutorial was based on Xcode 3.2.2 and 3.2.3 (beta at the time of writing):
来源:https://stackoverflow.com/questions/1285221/how-to-edit-an-default-xcode-template