Created
September 25, 2012 13:17
-
-
Save SPopenko/3781765 to your computer and use it in GitHub Desktop.
Instructions for devs to create their own ActionBar Implemntation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)setEntity:(id<SocializeEntity>)entity | |
{ | |
if(entity == nil) | |
{ | |
[_entity release]; _entity = nil; | |
return; | |
} | |
if(_entity != entity) | |
{ | |
[_entity release]; _entity = [entity retain]; | |
if([entity isFromServer]) | |
{ | |
[self continueConfiguration]; | |
} | |
else | |
{ | |
[SZEntityUtils addEntity:entity success:^(id<SZEntity> serverEntity) | |
{ | |
[_entity release]; _entity = [serverEntity retain]; | |
[self continueConfiguration]; | |
} | |
failure:^(NSError *error) { | |
SZEmitUIError(self, error); | |
}]; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) updateStatistic | |
{ | |
[SZEntityUtils getEntityWithKey:entity.key success:^(id<SZEntity> entity) | |
{ | |
self.entity = entity; | |
[self updateCountBobble]; | |
} failure:nil]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment