Skip to content

Instantly share code, notes, and snippets.

View vmihaylenko's full-sized avatar
🥑

Vlad Mihaylenko vmihaylenko

🥑
  • Lyft
  • Berlin, Germany
View GitHub Profile
@vmihaylenko
vmihaylenko / gist:74c395709bedb15d14db
Created September 11, 2014 09:12
Show all methods in class
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]);