Skip to content

Commit

Permalink
CocoaPods不支持MJDot,移除MJDot
Browse files Browse the repository at this point in the history
卧槽!CocoaPods不支持MJDot!
  • Loading branch information
CoderMJLee committed Sep 22, 2015
1 parent 30f2c41 commit 3e21c3f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions MJExtension/MJExtensionConst.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

#import <Foundation/Foundation.h>

// 点语法
#define MJDot(obj, type, prop) ((type)obj).prop

// 过期
#define MJExtensionDeprecated(instead) NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, instead)

Expand Down
2 changes: 1 addition & 1 deletion MJExtension/MJPropertyKey.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ - (id)valueInObject:(id)object
if ([object isKindOfClass:[NSDictionary class]] && self.type == MJPropertyKeyTypeDictionary) {
return object[self.name];
} else if ([object isKindOfClass:[NSArray class]] && self.type == MJPropertyKeyTypeArray) {
return MJDot(object, NSArray *, count) ? object[self.name.intValue] : nil;
return ((NSArray *)object).count ? object[self.name.intValue] : nil;
}
return nil;
}
Expand Down
Binary file not shown.

0 comments on commit 3e21c3f

Please sign in to comment.