mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 20:31:13 +08:00
Added non-underscored class name for NSCFBoolean matches in transformation from Boolean to String
This commit is contained in:
@@ -119,7 +119,7 @@ extern NSString* const RKObjectMappingNestingAttributeKeyName;
|
||||
// Number -> Date
|
||||
if ([destinationType isSubclassOfClass:[NSDate class]]) {
|
||||
return [NSDate dateWithTimeIntervalSince1970:[(NSNumber*)value intValue]];
|
||||
} else if ([sourceType isSubclassOfClass:NSClassFromString(@"__NSCFBoolean")] && [destinationType isSubclassOfClass:[NSString class]]) {
|
||||
} else if (([sourceType isSubclassOfClass:NSClassFromString(@"__NSCFBoolean")] || [sourceType isSubclassOfClass:NSClassFromString(@"NSCFBoolean")]) && [destinationType isSubclassOfClass:[NSString class]]) {
|
||||
return ([value boolValue] ? @"true" : @"false");
|
||||
}
|
||||
} else if ([destinationType isSubclassOfClass:[NSString class]] && [value respondsToSelector:@selector(stringValue)]) {
|
||||
|
||||
Reference in New Issue
Block a user