All I knew is this: Objective-c allows us to forward method invocation to its super class by
[super method]
However I want forward the invocation to super.super; Skipping the immediately super class.
In c++ we can easily do these by typecasting ((GrandSuper*)object).method().
Is their any provision to do the same in objective c
It’s probably a bad idea to do this, although it is possible. You probably want to think of a better way to achieve whatever you’re trying to do.
Let’s assume that you have three classes:
Catwhich inherits fromMammalwhich inherits fromAnimal.If you are in the method
-[Cat makeNoise], you can skip-[Mammal makeNoise]and call-[Animal makeNoise]like so: