DK
Size: a a a
DK
НС
DK
НС
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
guard let headerCell = tableView.dequeueReusableCell(withIdentifier: "groupsCell") as? GroupCell else {
return nil
}
let group = groups[section]
headerCell.configureCell(group, section: section)
headerCell.delegate = self
return headerCell // так не работает(хедеры не отображаются) с tableView.reloadSection, но работает с tableView.reloadData
return headerCell.contentView // так работает в обоих случаях
}
contentView
ячейки, а не саму ячейку. вот тут в последнем ответе решение так же там ссылка на альтернативное решение https://stackoverflow.com/questions/35541788/dequeuereusableheaderfooterviewwithidentifier-is-returning-nil-for-cell-but-deqS
S
НС
S
НС
S
РЛ
Д
B
A
DK
DK
A
B
A