Collection-View-in-a-Table-View-Cell
Collection-View-in-a-Table-View-Cell copied to clipboard
Why should UICollectionViewDataSource be in UIViewController instead of UITableViewCell ?
Hi thanks for sharing,
Would you tell me what the problem if we put UICollectionViewDataSource
in the UITableViewCell
?
Hey! It looks like this repo hasn't been updated for a while. That probably means the repo's not a high-priority for @ashfurrow. He'll answer this issue if he can, but just a head's up.
If you're using this project, you have the skills to improve it. If you've reported a bug, you are encouraged to open a pull request that fixes it. And of course, you're welcome to discuss with other developers in this repository's issues and pull requests. Have a great day!
Generated by :no_entry_sign: dangerJS
It's a good question, and it's a matter of opinion, really. I believe that UITableViewCell
s should only be concerned with display logic. To make them the data sources for the collection view would violate the single-responsibility principle. You could do it – there's nothing stopping you – but I would recommend against it.