NSOperation Xcode File Template

From Jeff LaMarche’s iPhone Development site:

iPhone Development: NSOperation Xcode File Template:

NSOperation Xcode File Template Although I’m generally averse to using a lot of template or boilerplate code, there are times when it’s handy to have file template beyond those that Apple provides. Something I’ve done a fair amount of lately is to create NSOperation subclasses, and there’s enough work involved with setting up an operation that I made an Xcode file template that contains all that setup work.

This template includes a delegate and a protocol and some private methods for communicating with the delegate. Now, when I have lots of NSOperation subclasses in a single project, I’ll actually move much of this stuff to an abstract parent class or a category on NSOperation, but templates don’t have any way of setting up dependencies, so I’ve made this self-contained and you can do your own refactoring.