title: Adding the same category to multiple classes
body: <p>I have an Objective-C category that I'd like to add to multiple classes without duplicating the code contained in the category. I simply want to add the same methods to multiple classes.</p>
  
  <p>I have existing categories on <code>NSManagedObject</code> subclasses (<code>Book</code>, <code>Chapter</code>, <code>Page</code>) and I would like to add common functionality throughout these subclasses in a clean and maintainable way.</p>
  
  <p>One way would be to add the category to their common superclass (<code>NSManagedObject</code>), but that has the consequence of adding the category's methods to all <code>NSManagedObject</code> subclasses when I want to add the methods to three NSManagedObject subclasses (<code>Book</code>, <code>Chapter</code>, <code>Page</code>).</p>
  
  <p>Another solution would be to subclass <code>NSManagedObject</code> and then have <code>Book</code>, <code>Chapter</code>, and <code>Page</code> inherit from that <code>NSManagedObject</code> subclass. This is the cleanest, most straight forward approach. The big downside with this approach is when the data model changes and Xcode regenerates the subclasses, it will reset them back to inheriting from <code>NSManagedObject</code> instead of <code>SubclassedManagedObject</code>. I'd like to avoid using something like mogenerator/Xmo'd if possible.</p>
  
  <p>Is it possible to add a single category on multiple classes without duplicating code?</p>
  
  <p>Thanks.</p>