- Fix vari
This commit is contained in:
1 parent
07ae0d3b42
commit
41c856b3c9
18 files changed
+794
-681
No files matched your search
@@ -27,6 +27,9 @@
|
||||
NSDictionary *properties = [PNObject propertiesForClass:self.class];
|
||||
|
||||
for (NSString *propertyName in properties) {
|
||||
if ([propertyName isEqualToString:@"description"] || [propertyName isEqualToString:@"debugDescription"]) {
|
||||
continue;
|
||||
}
|
||||
[self addObserver:self forKeyPath:propertyName options:NSKeyValueObservingOptionNew context:nil];
|
||||
}
|
||||
|
||||
@@ -39,8 +42,11 @@
|
||||
NSString *mappedJSONType;
|
||||
|
||||
NSString *propertyType = [properties valueForKey:propertyName];
|
||||
NSLogDebug(@"%@",self.objectMapping);
|
||||
|
||||
id mappingValue = [self.objectMapping valueForKey:propertyName];
|
||||
NSLogDebug(@"%@",[[self class] objcetMapping]);
|
||||
|
||||
id mappingValue = [[[self class] objcetMapping] valueForKey:propertyName];
|
||||
|
||||
if([mappingValue isKindOfClass:NSDictionary.class]) {
|
||||
mappedJSONKey = [mappingValue valueForKey:@"key"];
|
||||
@@ -55,7 +61,7 @@
|
||||
}
|
||||
|
||||
// Get JSON value for the mapped key
|
||||
id value = [JSON valueForKeyPath:propertyName];
|
||||
id value = [JSON valueForKeyPath:mappedJSONKey];
|
||||
|
||||
|
||||
((void (^)())@{
|
||||
|
||||
Reference in new issue
Block a user