Is there ability to insert base class to inheritance hierarchy?
Here is an example:
@interface BaseClass // has a lot of basic functionality and interface
{...}
@end
@interface ChildClass : BaseClass // customizes BaseClass functionality
{...}
@end
@interface BaseClassEx : BaseClass // add some features to base class
{...}
@end
I want to have ChildClassEx that has all methods from ChildClass but is inherited from BaseClassEx
Sounds like multiple inheritance. Objective C doesn’t have it.
Based on your description, I would suggest a different design pattern.
Now you can have four kinds of things.
Class inheritance is the “is a” pattern. The above combines both the “is a” pattern and the “has a” pattern. To get the effect of a ChildClassEx you want, you make something that “is a” BaseClassEx, but “has a” ChildUtility.