I have a dynamic table view with sections that I'd like to reuse in other scenarios, however only have certain sections shown. Is there a way I can hide an entire section so that my indexPath.section
logic doesn't need to be changed when certain sections aren't shown? I know there's
override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 0 {
return 0
}
return 60.0
}
to hide rows, I use that logic in a separate static tableView. But that still leaves the section header. Is there a way to do this where its seamless, as in hidden sections leave no blank space?