//对象转化为字典
-(NSMutableDictionary *)onereturnToDictionaryWithModel:(ScorelistTwo *)model
{
NSMutableDictionary *userDic = [NSMutableDictionary dictionary];
unsigned int count = 0;
objc_property_t *properties = class_copyPropertyList([ScorelistTwo class], &count);
for (int i = 0; i < count; i++) {
const char *name = property_getName(properties[i]);
NSString *propertyName = [NSString stringWithUTF8String:name];
id propertyValue = [model valueForKey:propertyName];
if (propertyValue) {
[userDic setObject:propertyValue forKey:propertyName];
}
}
free(properties);
return userDic;
}