ANDYDataStack 2.0.2

ANDYDataStack 2.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jan 2015

Maintained by Elvis Nuñez.



This is class that helps you to aliviate the Core Data boilerplate. Now you can go to your AppDelegate remove all the Core Data related code and replace it with an instance of ANDYDataStack.

- (void)applicationWillTerminate:(UIApplication *)application
{
    [self.dataStack persistContext];
}

Then in your NSFetchedResultsController backed app (attached to your main context). You can do this:

#pragma mark - Actions

- (void)createTask
{
    [self.dataStack performInBackgroundContext:^(NSManagedObjectContext *context) {
        Task *task = [Task insertInManagedObjectContext:context];
        task.title = @"Hello!";
        task.date = [NSDate date];
        [context save:nil];
    }];
}

BOOM, it just works.

(Hint: Maybe you haven't found the best way to use NSFetchedResultsController, well here it is.)

Be Awesome

If something looks stupid, please create a friendly and constructive issue, getting your feedback would be awesome. Have a great day.