Closed altyus closed 9 years ago
The readme shows the following two methods as examples, but the library actually includes a mainContext param in the two DATASource initializers.
DATASource *dataSource = [[DATASource alloc] initWithTableView:self.tableView fetchRequest:fetchRequest cellIdentifier:ANDYCellIdentifier configuration:^(UITableViewCell *cell, Task *task, NSIndexPath *indexPath) { cell.textLabel.text = task.title; };
DATASource *dataSource = [[DATASource alloc] initWithCollectionView:self.collectionView fetchRequest:fetchRequest cellIdentifier:ANDYCellIdentifier configuration:^(UICollectionView *cell, Task *task, NSIndexPath *indexPath) { cell.textLabel.text = task.title; };
The actual methods are:
- (instancetype)initWithTableView:(UITableView *)tableView fetchRequest:(NSFetchRequest *)fetchRequest cellIdentifier:(NSString *)cellIdentifier mainContext:(NSManagedObjectContext *)mainContext configuration:(void (^)(id cell, id item, NSIndexPath *indexPath))configuration;
- (instancetype)initWithCollectionView:(UICollectionView *)collectionView fetchRequest:(NSFetchRequest *)fetchRequest cellIdentifier:(NSString *)cellIdentifier mainContext:(NSManagedObjectContext *)mainContext configuration:(void (^)(id cell, id item, NSIndexPath *indexPath))configuration;
Fixed in #11
The readme shows the following two methods as examples, but the library actually includes a mainContext param in the two DATASource initializers.
The actual methods are: