Skip to content

Implementation of generic UITableViewDataSource that can be used to reduce the amount of code in UIViewControllers.

License

Notifications You must be signed in to change notification settings

raphaeloliveira/ArrayDataSource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArrayDataSource

Implementation of a generic UITableViewDataSource that can be used to reduce the amount of code in UIViewControllers.

Inspired by the great article lighter-view-controllers

How to install it?

Just drag and drop the ROArrayDataSource folder on your project or use cocoapods

How to use it?

Just set an instance of ROArrayDataSource as the dataSource of the table view.

- (void)setupTableViewDataSource
{
    self.dataSource = [[ROArrayDataSource alloc] initWithItems:self.data cellIdentifier:cellIdentifier configureCellBlock:^(CustomCell *cell, NSObject *object) {
        cell.label.text = [object description];
    }];
    self.tableView.dataSource = self.dataSource;
}

About

Implementation of generic UITableViewDataSource that can be used to reduce the amount of code in UIViewControllers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published