Created
November 3, 2016 15:17
-
-
Save mkuliszkiewicz/2ecee91654b6dc8a4674924f0c93a7b4 to your computer and use it in GitHub Desktop.
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 DumpObjcMethods(Class clz) { | |
unsigned int count = 0; | |
Method *methods = class_copyMethodList(clz, &count); | |
printf("Found %d methods on '%s'\n", count, class_getName(clz)); | |
for (unsigned int i = 0; i < count; i++) { | |
Method method = methods[i]; | |
printf("\t'%s' has method named '%s' of encoding '%s'\n", | |
class_getName(clz), | |
sel_getName(method_getName(method)), | |
method_getTypeEncoding(method)); | |
} | |
free(methods); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment