Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [[MYCoreDataManager sharedInstance]doTaskwithCompletion:^(BOOL complete) {
- if (complete == YES) {
- dispatch_async(dispatch_get_main_queue(), ^{
- // back to the main thread
- });
- }
- }];
- -(void)doTaskwithCompletion:(coreDataCompletion)complete
- {
- [self.backgroundManagedObjectContext performBlock:^{
- // do my BG core data task
- [self saveContext:self.backgroundManagedObjectContext];
- complete(YES);
- }];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement