Latest0.1
Homepagehttps://github.com/aligadzhiev/RITableDataSource
LicenseMIT
Platformsios 5.0, requires ARC
FrameworksCoreData
Authors

UITableView data source based on NSFetchedResultsController.

NSFetchRequest * fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"Contact"];
// Configure the request's entity, and optionally its predicate.
NSSortDescriptor * sortByFirstLetter = [[NSSortDescriptor alloc] initWithKey:@"firstLetter"
                                                                   ascending:YES
                                                                    selector:@selector(localizedCaseInsensitiveCompare:)];
NSSortDescriptor * sortByName = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES];
[fetchRequest setSortDescriptors:@[sortByFirstLetter, sortByName]];

NSFetchedResultsController * controller = <#Fetched results controller#>

RITableDataSource * dataSource = [RITableDataSource dataSourceWithFetchedResultsController:controller];
[dataSource setReusableIdentifierBlock:^NSString *(NSIndexPath * indexPath) {
    return <#Cell reusable identifier#>;
}];
[dataSource setConfigureCellBlock:^(UITableViewCell * cell, NSIndexPath * indexPath, id object) {
    // Configurate cell here
}];
dataSource.tableView = self.tableView;

Requirements

RITableDataSource requires Xcode 4.4 with either the iOS 5.0 SDK.

Installation

CocoaPods is the recommended way to add RITableDataSource to your project.

Here’s an example podfile that installs RITableDataSource.

Podfile

platform :ios, '5.0'

pod 'RITableDataSource'

License

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

Latest podspec

{
    "name": "RITableDataSource",
    "version": "0.1",
    "summary": "UITableView data source based on NSFetchedResultsController.",
    "homepage": "https://github.com/aligadzhiev/RITableDataSource",
    "authors": {
        "Ali Gadzhiev": ""
    },
    "license": "MIT",
    "platforms": {
        "ios": "5.0"
    },
    "source": {
        "git": "https://github.com/aligadzhiev/RITableDataSource.git",
        "tag": "0.1"
    },
    "source_files": "RITableDataSource/*.{h,m}",
    "frameworks": "CoreData",
    "requires_arc": true
}

Pin It on Pinterest

Share This