While mprivat and Sulthan's answers are technically correct, the current case is a bit more complicated (and interesting):
Consideration of the implementation of a method call. It uses (of course) an object pointer. An object pointer is a pointer to a structure that has as its first element ( isa ) a pointer to a class of objects. The class methods (i.e., as mprivat and Sulthan stated correctly, the same in both cases) follows this pointer to define the class, i.e. Always the class of the caller .
As a result, if A is a superclass of B, both calls to [self class] and [super class] called by instance of B will return class B ( not of A, which might be expected due to a missing redefinition!).
Matthias
source share