How do you get rid of all the junk at the top of a Cocoa class in Xcode?
I looked here, and went where Macmade said to go. I then deleted everything above #import in the two FILEBASENAME files at File Templates/Cocoa/Objective-C class.xctemplate/NSObject. However, I'm creating new classes in Xcode, derived from NSObject, and I'm getting all the same stuff as before. How can I be rid of it?
(I'm open to the possibility that I shouldn't be getting rid of开发者_如何学编程 it, but I don't believe it's useful in the least. Is it?)
The “junk” is comments, and comments make no difference to the preprocessor, compiler, linker, or user, so there's no harm in getting rid of it.
Like everything else in the file, it comes from the file template you created the file from. You'll need to make copies of the file templates you use and remove the comments from your copies; then, there will be no comments in any files you create in Xcode from the new templates.
I suggest removing the import(s), too, while you're at it. Your prefix header should take care of that; importing system headers anywhere else should be nothing but further noise.
精彩评论