(Cocoa) Can I Subclass and Delegate at the same time?
- by Alvin
@interface ClassB <ClassADelegate> : ClassA
id <ClassBDelegate> delegate;
@end
As the code says, ClassB subclasses from ClassA and handles the formation protocol of Class A. However, the variable "delegate" will be duplicated. (ClassA also has "delegate")
In fact, it can be done without subclassing, but it seems the code is…