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
First set tableView.tableFooterView = customView
Then, call updateTableFooterViewSize()
function in viewDidLayoutSubviews
or layoutSubviews
private func updateTableFooterViewSize() {
let width: CGFloat = view.frame.width // required width
let height: CGFloat = 50 // required height
tableView.tableFooterView?.frame.size = CGSize(width: width, height: height)
}