@interface MySuperclass : NSObject {
}
@end
@interface MySuperclass (MyCategory)
- (void)myMethod;
@end
@interface MySubclass : MySuperclass {
}
@end
@interface MySubclass (MyOtherCategory)
- (void)myMethod;
@end
Is it defined which implementation of -myMethod will be called?
Kochan states in Programming in Objective-C that:
If more than one category declares a method with the same name for the same class, it is not defined which method will be executed when invoked.
But I am not sure whether or not a category on a superclass is considered to be a category on the same class in this context.