Do Categories get Inherited?

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

  1. BadWolf13 macrumors 6502

    Joined:
    Dec 17, 2009
    #1
    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

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

Share This Page