/ Published in: Objective C
Reading a Unity Group object from a Unity server.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Group *tempGroup = [[Group alloc]init]; tempGroup.entityId=((Member *)self.loggedInUserProfile.memberships[indexPath.row]).groupId; __block Group *groupToRead = [self.cachedGroupsData objectForKey:[NSNumber numberWithInt:tempGroup.entityId]]; if(groupToRead) { cell.cellGroup=groupToRead; } [self readUnityObject:tempGroup withCompletionBlock:^(id object, bool success, NSString *errorMessage) { if(success) { groupToRead=((Group *)object); dispatch_async(dispatch_get_main_queue(), ^{ cell.cellGroup=groupToRead; }); } else { NSLog(@"%@",errorMessage); } }];