Do Categories get Inherited?

Discussion in 'Mac Programming' started by BadWolf13, Jan 29, 2011.

  1. BadWolf13 macrumors 6502

    Dec 17, 2009
    I'm just wondering, if you create a category for an existing class, like NSString or NSArray, will the methods also be adopted by the subclasses, like NSMutableString and NSMutableArray?
  2. kpua macrumors 6502

    Jul 25, 2006
    Yes, absolutely. This is absolutely necessary for categories on NSObject to affect every subclass, like KVO and KVC.

Share This Page