-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
Milestone
Description
We should be able to unify our table- and collection-specific components into single, generic components using a similar approach to https://github.com/jessesquires/JSQDataSourcesKit.
The model in JSQDataSourcesKit and here are a bit different, but we should be able to do this. The main difference is that JSQDataSourcesKit does not consume the delegate properties — only the dataSource.
Todo (roughly):
- Unify
CollectionViewCellViewModelandTableViewCellViewModel-->CellViewModel<T> - Unify
CollectionViewModelandTableViewModel-->CellParentViewModel<T> - Unify the nested
SectionModels - Unify
CollectionViewDataSourceandTableViewDataSource-->DataSource<T>
Then, we can implement the UITableViewDataSource and UICollectionViewDataSource methods in constrained extensions on DataSource<T> similar to this:
https://github.com/jessesquires/JSQDataSourcesKit/blob/develop/Source/DataSourceProvider.swift#L64