Class currentClass = [NSClassFromString(@"ClassName") class];
while (currentClass) {
// Iterate over all instance methods for this class
unsigned int methodCount;
Method *methodList = class_copyMethodList(currentClass, &methodCount);
unsigned int i = 0;
for (; i < methodCount; i++) {
NSLog(@"%@ - %@", [NSString stringWithCString:class_getName(currentClass) encoding:NSUTF8StringEncoding], [NSString stringWithCString:sel_getName(method_getName(methodList[i])) encoding:NSUTF8StringEncoding]);
}
free(methodList);
currentClass = class_getSuperclass(currentClass);
}
Forked from vmihaylenko/gist:74c395709bedb15d14db
Last active
August 29, 2015 14:07
-
-
Save igrechuhin/66115d2955d36e22295c to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment