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);
}
Created
September 11, 2014 09:12
-
-
Save vmihaylenko/74c395709bedb15d14db to your computer and use it in GitHub Desktop.
Show all methods in class
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment