diff --git a/MJExtension/NSObject+MJKeyValue.h b/MJExtension/NSObject+MJKeyValue.h index 2428a4ab..45bea86c 100755 --- a/MJExtension/NSObject+MJKeyValue.h +++ b/MJExtension/NSObject+MJKeyValue.h @@ -60,6 +60,7 @@ * 当字典转模型完毕时调用 */ - (void)mj_keyValuesDidFinishConvertingToObject; +- (void)mj_keyValuesDidFinishConvertingToObject:(NSDictionary *)keyValues; /** * 当模型转字典完毕时调用 diff --git a/MJExtension/NSObject+MJKeyValue.m b/MJExtension/NSObject+MJKeyValue.m index 84fe982b..bbd866c9 100755 --- a/MJExtension/NSObject+MJKeyValue.m +++ b/MJExtension/NSObject+MJKeyValue.m @@ -197,6 +197,9 @@ - (instancetype)mj_setKeyValues:(id)keyValues context:(NSManagedObjectContext *) if ([self respondsToSelector:@selector(mj_keyValuesDidFinishConvertingToObject)]) { [self mj_keyValuesDidFinishConvertingToObject]; } + if ([self respondsToSelector:@selector(mj_keyValuesDidFinishConvertingToObject:)]) { + [self mj_keyValuesDidFinishConvertingToObject:keyValues]; + } return self; } @@ -706,4 +709,4 @@ - (NSString *)JSONString { return [self mj_JSONString]; } -@end \ No newline at end of file +@end