Skip to content

Instantly share code, notes, and snippets.

@DaveBatton
Created December 23, 2016 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DaveBatton/979d16419067966e833997171808920b to your computer and use it in GitHub Desktop.
Save DaveBatton/979d16419067966e833997171808920b to your computer and use it in GitHub Desktop.
//
// MCFetchedResultsViewController.h
//
//
// Created by Dave Batton on 5/10/15.
//
#import <UIKit/UIKit.h>
#import <CoreData/CoreData.h>
#import "MCTemporaryContextViewController.h"
@interface MCFetchedResultsViewController : MCTemporaryContextViewController <UITableViewDataSource, UITableViewDelegate, NSFetchedResultsControllerDelegate>
@property (nonatomic, weak) IBOutlet UITableView *tableView;
@property (nonatomic, strong) NSManagedObjectContext *fetchedResultsManagedObjectContext; // Defaults to the AppDelegate MOC, not the temporary MOC.
@property (nonatomic, strong) NSFetchedResultsController *fetchedResultsController;
@property (nonatomic, strong) NSString *fetchedResultsEntityName;
@property (nonatomic, strong) NSPredicate *fetchedResultsPredicate;
@property (nonatomic, strong) NSArray *fetchedResultsSortDescriptors;
@property (nonatomic, strong) NSString *fetchedResultsSectionNameKeyPath;
- (void)performFetch;
- (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath;
- (IBAction)toggleEdit:(id)sender;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment