2012年10月25日星期四

Print Method List of an iOS class


    Working with a SDK that has few public API Interface, I've to get methods inside it. So following code can help:
    int unsigned methodCount;
    Method *methods = class_copyMethodList([SDKCLASS class], &methodCount);
    for (int i = 0;i<methodCount;i++){
        NSLog(@"%@", NSStringFromSelector(method_getName(methods[i])));
    }
    And Done~