UITableView tableFooterView shows at the top of the UITableView - wrong

前端 未结 7 2312
北海茫月
北海茫月 2021-02-08 15:37

I have created a very simple test case to reproduce this issue.

I am trying to set a footer view programmatically to a tableview. Please note that I am referring to the

7条回答
  •  执笔经年
    2021-02-08 16:04

    set grouped style for table and set height for header CGFloat.leastNonzeroMagnitude

    tableView.style = .grouped
    
    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
        return CGFloat.leastNonzeroMagnitude
    }
    

提交回复
热议问题