SMBFetchedResultsController 0.1.3

SMBFetchedResultsController 0.1.3

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

Maintained by David Fu.



  • By
  • David Fu

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Use it just like NSFetchedResultsController, set it up:

- (void)viewDidLoad {
    [super viewDidLoad];

    self.dataSource = [NSMutableOrderedSet orderedSetWithObject:[[Person alloc] initWithName:@"sherry"]];
    SMBFetchedResults *fetchedResults = [[SMBFetchedResults alloc] initWithMutableData:self.dataSource];
    self.fetchedResultsController = [[SMBFetchedResultsController alloc] initWithFetchedResults:fetchedResults title:@"SMB" delegate:self];
}

insert operation to SMBFetchedResults data struct:

- (IBAction)insertButtonClick:(id)sender {
    Person *person = [[Person alloc] initWithName:@"david"];
    [self.fetchedResultsController.fetchedResults insertObject:person inDataAtIndex:0];
}

that's it!

Requirements

Installation

SMBFetchedResultsController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "SMBFetchedResultsController"

Author

David Fu, [email protected]

License

SMBFetchedResultsController is available under the MIT license. See the LICENSE file for more info.