I've been searching for this one for quite a while and didn't find a solution that works for me.
I've setup the UITableView
as Grouped
and each section header will hold a UIView
that will be used to represent a question on a question-answer application and each section will hold a number of rows that will be used to represent the answers to that previous question.
The problem is: there is a vertical spacing between each section group, and I want to remove it.
I already tried to do like suggested in here but looks like it didn't worked.
I also tried using a minimal value for the estimatedHeightForFooterInSection
as 0.00001
as suggested here. But I'm getting the following error:
'section footer height must not be negative - provided height for section 1 is -0.000010'
Is there a way to make this work without abandoning the strategy (section for question, rows for answers)?
For some reason tableView.estimatedSectionFooterHeight = 0.0
was not working but tableView.sectionFooterHeight = 0.0
did, even with the UITableView.style = .grouped
.
Also I was using an empty UIView
as my footer view.
tableView.tableFooterView = UIView(frame: CGRect.zero)
tableView.sectionFooterHeight = 0.0
Thanks for all your help!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With