ios-swift-collapsible-table-section
ios-swift-collapsible-table-section copied to clipboard
How to give space between two section
facing issue to give space between sections please help.
You can use footer views between your section and give them the desired height.
override func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 1.0
}
override func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
// UIView with background for section-separators as Section Footer
let v = UIView(frame: CGRect(x: 0, y:0, width: tableView.frame.width, height: 1))
v.backgroundColor = .lightGray
return v
}