TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by József Vesza.
A basic, reusable and expandable UICollectionViewDataSource
class to take the clutter out of your UICollectionView
classes. It depends on a cell configurator class that conforms to the JVRCellConfiguratorDelegate
protocol. For cell configuration example, please see the JVRCellConfiguratorDelegate
GitHub page.
#import "JVRCollectionViewDataSource.h"
#import "JVECellConfigurator.h"
@interface MyCollectionViewController ()
@property (nonatomic, strong) JVRCollectionViewDataSource *dataSource;
@end
@implementation MyCollectionViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.dataSource = [JVRCollectionViewDataSource
dataSourceForCollectionView:self.collectionView
withItems:self.viewModel.model
usingCellConfigurator:[[MyCellConfigurator alloc] init]];
}
@end
Source files can be added manually, however the preferred way to add the class to your project is installation through CocoaPods, using the following Podfile
pod 'JVRCollectionViewDataSource'
This will install JVRCollectionViewDataSource
and JVRCellConfiguratorDelegate
as an additional dependency.