- Fix SharedInstance User
- Fix Object save Locally - Fix Object fetch Locally - Add Object delete Locally
This commit is contained in:
1 parent
7e5a6149a8
commit
4c97b281ed
9 files changed
+81
-48
No files matched your search
@@ -77,15 +77,17 @@ static bool isFirstAccess = YES;
|
||||
if (isFirstAccess) {
|
||||
[self doesNotRecognizeSelector:_cmd];
|
||||
}
|
||||
self = [super init];
|
||||
|
||||
NSDictionary *savedUser = [[PNObjectModel sharedInstance] fetchObjectsWithClass:[self class]];
|
||||
|
||||
if (savedUser) {
|
||||
self = [super initWithJSON:savedUser];
|
||||
}
|
||||
else {
|
||||
self = [super init];
|
||||
}
|
||||
|
||||
if (self) {
|
||||
[self setSubClassDelegate:self];
|
||||
|
||||
super.JSON = [super.objectModel fetchObjectsWithClass:[self class]];
|
||||
|
||||
if(super.JSON){
|
||||
[super populateObjectFromJSON:super.JSON];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user