- (id)parsedic:(NSDictionary *)myDic usingModel:(Class)model {
? ?unsigned int outCount;
? ?objc_property_t *properties = class_copyPropertyList([model class], &outCount);
? ?NSEnumerator *enumeratorKey = [myDic keyEnumerator];
? ?NSString *key;
? ?NSString *name;
? ?id value;
? ?id obj = [[model alloc] init];
? ?const char *propertyName;
? ?for (key in enumeratorKey) {
? ? ? ?for (int i = 0; i < outCount; i++) {
? ? ? ? ? ?objc_property_t property = properties[i];
? ? ? ? ? ?propertyName = property_getName(property);
? ? ? ? ? ?name = [NSString stringWithUTF8String: propertyName];
? ? ? ? ? ?if ([[key uppercaseString] isEqualToString: [name uppercaseString]]) {
? ? ? ? ? ? ? ?value = [myDic objectForKey: key];
? ? ? ? ? ? ? ?[obj setValue: value forKey: name];
? ? ? ? ? ?}
? ? ? ?}
? ?}
? ?return obj;
}