Created
March 8, 2013 21:02
-
-
Save anonymous/5119816 to your computer and use it in GitHub Desktop.
Dump class inheritance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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