I set the delegate and datasource to self. This is the code I want to run:
func tableView(_ tableView: UITableView, willDisplayFooterView view: UIView, forSection section: Int) {
print("load")
}
This is how I added the footerView:
let footerView = UIView(frame: CGRect(x: 0, y: 0, width: table.frame.width, height: table.rowHeight))
let loader = NVActivityIndicatorView(frame: CGRect(x: 0, y: 0, width: table.frame.width, height: table.rowHeight), type: .ballScaleMultiple, color: .white)
loader.startAnimating()
loader.center = footerView.center
footerView.addSubview(loader)
table.tableFooterView = footerView
I can see the footerView, but "load" is never executed. How can I be notified when the footerView is presented?