Commit b25f4a43 authored by Sandy's avatar Sandy

Merge branch 'master' of https://git.oschina.net/gomoretech/RedstarIOS

# Conflicts:
#	redstar/Classes/Macro/Url.h
parents 5e062531 ce8966f0
...@@ -31,4 +31,16 @@ ...@@ -31,4 +31,16 @@
return self; return self;
} }
- (void)setValuesForKeysWithDictionary:(NSDictionary<NSString *,id> *)keyedValues{
Class cls = self.class;
for (NSString *key in keyedValues.allKeys) {
NSString *varName = [NSString stringWithFormat:@"_%@", key];
const char *c_key = [varName cStringUsingEncoding:NSUTF8StringEncoding];
Ivar var = class_getInstanceVariable(cls, c_key);
if (var) {
[self setValue:[keyedValues objectForKey:key] forKey:key];
}
}
}
@end @end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment