I have a condition based on which, I need to hide the header for my static tableView. My tableview's style is grouped
and every section has a title in the section Header.
I am setting the height of the 5th section to CGFloat.leastNormalMagnitude
because I want it to disappear but it is not working.
override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
if hideFifthRow{
if section == 4 {
return CGFloat.leastNormalMagnitude
}
}
return tableView.sectionHeaderHeight
}
Can anyone please help.