futuredapp / CellKit

Table View and Collection View data source wrapper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extend abstract data source to flow delegate

mkj-is opened this issue · comments

If you want to override some flow layout delegate methods in data source you cannot simply do it, because the data source would be inheriting from more classes.

I propose changing UITableViewDelegate to UICollectionViewDelegateFlowLayout:
https://developer.apple.com/documentation/uikit/uicollectionviewdelegateflowlayout

Other way is always creating new delegate object or implementing the delegate on VC and passing it to table view.