ios-swift-collapsible-table-section icon indicating copy to clipboard operation
ios-swift-collapsible-table-section copied to clipboard

How to give space between two section

Open vnanaware opened this issue 5 years ago • 2 comments

facing issue to give space between sections please help.

vnanaware avatar May 09 '19 04:05 vnanaware

You can use footer views between your section and give them the desired height.

Mvdl avatar May 18 '19 07:05 Mvdl

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
   }

azeemohd786 avatar Feb 22 '21 05:02 azeemohd786