Skip to content

Commit

Permalink
修改拼写错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Jianing93 committed Jul 27, 2015
1 parent 614948b commit 7b46948
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion MJExtension/NSObject+MJKeyValue.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#import "MJType.h"
#import "MJExtensionConst.h"
#import "MJFoundation.h"
#import "NSString+MJExtensino.h"
#import "NSString+MJExtension.h"

@implementation NSObject (MJKeyValue)

Expand Down
4 changes: 2 additions & 2 deletions MJExtension/NSObject+MJProperty.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ typedef NSString * (^MJReplacedKeyFromPropertyName121)(NSString *propertyName);
/** 数组中需要转换的模型类 */
typedef NSDictionary * (^MJObjectClassInArray)();
/** 用于过滤字典中的值 */
typedef id (^MJNewValueFormOldValue)(id object, id oldValue, MJProperty *property);
typedef id (^MJNewValueFromOldValue)(id object, id oldValue, MJProperty *property);

/** 这个数组中的属性名才会进行字典和模型的转换 */
typedef NSArray * (^MJAllowedPropertyNames)();
Expand Down Expand Up @@ -60,7 +60,7 @@ typedef NSArray * (^MJIgnoredCodingPropertyNames)();
*
* @param newValueFormOldValue 用于过滤字典中的值
*/
+ (void)setupNewValueFormOldValue:(MJNewValueFormOldValue)newValueFormOldValue;
+ (void)setupNewValueFormOldValue:(MJNewValueFromOldValue)newValueFormOldValue;
+ (id)getNewValueFormOldValue:(__weak id)oldValue object:(__weak id)object property:(__weak MJProperty *)property;

#pragma mark - key配置
Expand Down
4 changes: 2 additions & 2 deletions MJExtension/NSObject+MJProperty.m
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ + (NSMutableArray *)properties
}

#pragma mark - 新值配置
+ (void)setupNewValueFormOldValue:(MJNewValueFormOldValue)newValueFormOldValue
+ (void)setupNewValueFormOldValue:(MJNewValueFromOldValue)newValueFormOldValue
{
objc_setAssociatedObject(self, &MJNewValueFromOldValueKey, newValueFormOldValue, OBJC_ASSOCIATION_COPY_NONATOMIC);
}
Expand All @@ -207,7 +207,7 @@ + (id)getNewValueFormOldValue:(__weak id)oldValue object:(__weak id)object prope
{
__block id newValue = nil;
[self enumerateAllClasses:^(__unsafe_unretained Class c, BOOL *stop) {
MJNewValueFormOldValue block = objc_getAssociatedObject(c, &MJNewValueFromOldValueKey);
MJNewValueFromOldValue block = objc_getAssociatedObject(c, &MJNewValueFromOldValueKey);
if (block) {
newValue = block(object, oldValue, property);
*stop = YES;
Expand Down

0 comments on commit 7b46948

Please sign in to comment.