I have footer func. And i want to show separator at top of this cell and hide it at bottom.
override func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let footer = UITableViewCell(frame: CGRect(x: 0, y: 0, width: tableView.frame.width, height: 50))
let label = UILabel(frame: CGRect(x: 0, y: 0, width: tableView.frame.width, height: 50))
label.text = "HELLO"
label.textAlignment = .center
label.textColor = UIColor.lightGray
footer.addSubview(label)
tableView.tableFooterView = footer
return footer
}
How could I turn on separator there programmatically?