Reusable data source models for your iOS application, inspired by the lighter view controllers movement.
To run the example project; clone the repo, and run pod install
then open AEFDataSource.xcworkspace
.
A data source for a UITableView that supports an array of items or a multidimensional array of items for section support.
NSArray *items = @[@[@"Row", @"Row"], @[@"Row", @"Row"]];
self.dataSource = [[AEFTableViewDataSource alloc] initWithItems:items
cellIdentifier:@"Cell"
configureCellBlock:^(UITableViewCell *cell, id item, NSIndexPath *indexPath) {
cell.textLabel.text = [NSString stringWithFormat:@"%@_%i", item, indexPath.row];
}];
self.tableView.dataSource = self.dataSource;
See the example application for more in depth usage examples.
AEFDataSource is available through CocoaPods, to install it simply add the following line to your Podfile:
pod "AEFDataSource"
Alex Fish, alex@alexefish.com
AEFDataSource is available under the MIT license. See the LICENSE file for more info.