Iam嘗試將tableview添加到視圖控制器。一切正常,但頁腳隱藏/禁用?我不知道。Tableview頁腳不顯示
我的代碼:
private let footerView = UIView()
footerView.backgroundColor = UIColor.Green.color
footerView.addSubview(activityIndicator)
tableView.addSubview(footerView)
tableView.delegate = self
tableView.dataSource = self
tableView.tableFooterView = footerView
tableView.sectionFooterHeight = 20
tableView.footerViewForSection(0)
tableView.tableHeaderView = footerView
肯定的:
func tableView(tableView: UITableView, titleForFooterInSection section: Int) -> String? {
return "test.."
}
func tableView(tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return footerView
}
func tableView(tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 20
}
我都嘗試執行(僅空格)分開並沒有什麼。
而我的頁腳視圖是淺灰色和實施活動的指標是「看不見」的(框被設置)
及其與的ViewController的tableView。
任何想法,爲什麼不頁腳視圖可見光右?
謝謝。
儘管此代碼可能會回答這個問題,它會從一個解釋中受益。 – BDL