У меня простое табличное представление, цвет фона заголовка раздела табличного представления ясен, есть ли способ скрыть ячейки под разделом при прокрутке?Пожалуйста, смотрите изображение ниже:
Вот реализация viewForHeaderInSection
:
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let cell = tableView.dequeueReusableHeaderFooterView(withIdentifier: "SYReminderHeaderCell")
let header = cell as! SYReminderHeaderCell
header.headerTitleLabel.textColor = .white
header.configureSectionItems()
guard let sectionInfo = fetchedResultsController.sections?[section] else {
return nil
}
header.contentView.backgroundColor = .clear
let title = SYDateUtils.prepareSectionTitleForTimeLineView(stringDate: sectionInfo.name)
header.setHeaderTitleAttribute(title: title)
let subTitle = SYDateUtils.prepareSectionSubTitleForTimeLineView(stringDate: sectionInfo.name)
header.setSubHeaderTitleAttribute(subTitle: subTitle)
header.separaterHeaderHeightConstraint.constant = 1/UIScreen.main.scale
header.separaterHeader.alpha = 0.0
header.layer.masksToBounds = true
return cell
}
Есть предложения?