Reputation: 705
I made a swift project open source that is a demo about using Collection View inside Table View Cells.
Everything is working, except a bug in the third cell that has an empty space and i debug it a lot and don't find any solution.
A screenshot:
The project: https://github.com/prsolucoes/TableWithCollection
This issue with a video: https://github.com/prsolucoes/TableWithCollection/issues/1
Can anyone help me?
Thanks.
Upvotes: 0
Views: 211
Reputation: 291
In ViewController createAll() function, you need to remove this line:
tableView.estimatedRowHeight = max(UIScreen.main.bounds.width, UIScreen.main.bounds.height)
I assume it's setting the first nonvisible row (3) when loading the UITableView with double the height. Because using your code after scrolling and coming back it worked fine.
Upvotes: 1