Reputation: 5234
Is there possible to track back the class's super classes until ending up with NSObject?
I have some pseudocode over here but it needs some implementations.
SomeObject *someObj;
id *currentParent = someObj.Parent;
while (currentParent)
{
NSLog(@"%@",currentParent);
currentParent = currentParent.Parent;
}
Upvotes: 0
Views: 28
Reputation: 24248
SomeObject *someObj;
id currentParent = [someObj superclass];
while (currentParent)
{
NSLog(@"%@",currentParent);
currentParent = [currentParent superclass];
}
Upvotes: 2