You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!overridenMethods) overridenMethods = @[@"initWithArray:modelClass:",@"objectAtIndex:",@"count",@"modelWithIndexValue:",@"description",@"mutableCopy",@"firstObject",@"lastObject"];
69
+
if ([overridenMethods containsObject:NSStringFromSelector(selector)]) {
70
+
return self;
71
+
}
72
+
return _storage;
73
+
}
74
+
55
75
- (NSUInteger)count
56
76
{
57
77
return _storage.count;
@@ -60,9 +80,9 @@ - (NSUInteger)count
60
80
-(id)modelWithIndexValue:(id)indexValue
61
81
{
62
82
if (self.count==0) returnnil;
63
-
if (![self[0] indexPropertyName]) returnnil;
83
+
if (![_storage[0] indexPropertyName]) returnnil;
64
84
65
-
for (JSONModel* model in self) {
85
+
for (JSONModel* model in _storage) {
66
86
if ([[model valueForKey:model.indexPropertyName] isEqual:indexValue]) {
67
87
return model;
68
88
}
@@ -81,7 +101,7 @@ -(id)mutableCopy
81
101
-(NSString*)description
82
102
{
83
103
NSMutableString* res = [NSMutableStringstringWithFormat:@"<JSONModelArray[%@]>\n", [_targetClass description]];
0 commit comments