Swift4でプログラムで作成したUITableviewController
があります。絵でUITableViewControllerフッター内のカスタムUITableViewセル
マークされた矩形は、私がfooterviewでテーブルビューのセルにカスタムセルをロードする
override func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let tableFooterView = UITableView()
tableFooterView.rowHeight = 100
return tableFooterView
}
override func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 365
}
内部UITableView
と私のfooterviewです。私はこの次のコード
tableFooterView.dequeueReusableCell(withIdentifier: emptyCellIdentifier) as! EmptyTableViewCells
を使用してみました。しかし、私はエラーを取得する -
fatal error: unexpectedly found nil while unwrapping an Optional value
あなたはviewForFooterInSection
方法で作成しているときフッターのtableViewのためにセルを登録する必要があり、あなた
@ NasimRony助けてくれましたか? –