I am using a UITableviewcontroller
and I want the footer view to always stay at the bottom of the screen. However, the y
Swift Code which make the footerView fill the rest space at the bottom, then you can use autolayout to make you view at the bottom in the footerView:
override func viewDidLayoutSubviews()
{
super.viewDidLayoutSubviews()
guard let footerView = tableView.tableFooterView else
{
return
}
var cellsHeight:CGFloat = tableView.tableHeaderView?.frame.height ?? 0
let sections = self.numberOfSections(in: tableView)
for section in 0..