#iOS 反射获取 类属性列表
- 必须加入runtime 头文件
import <objc/runtime.h>
unsigned int outCount, i;
objc_property_t *properties = class_copyPropertyList([PremiumCalculateItemKindFee class], &outCount);
for (i=0; i<outCount; i++) {
objc_property_t property = properties[i];
NSString * key = [[NSString alloc]initWithCString:property_getName(property) encoding:NSUTF8StringEncoding];
NSLog(@"property[%d] :%@ \n", i, key);
}