Skip to content

Instantly share code, notes, and snippets.

@ShonFrazier
Forked from anonymous/dumpInheritance.c
Created March 8, 2013 21:05
Show Gist options
  • Save ShonFrazier/5119834 to your computer and use it in GitHub Desktop.
Save ShonFrazier/5119834 to your computer and use it in GitHub Desktop.
#import <objc/runtime.h>
void dumpInheritance(Class cls) {
do {
NSLog(@"%@", cls);
} while ((cls = class_getSuperclass(cls)) != [NSObject class]);
NSLog(@" = = %@ ends", @(__PRETTY_FUNCTION__));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment