Как скрыть ячейки под заголовком раздела табличного представления? - PullRequest
1 голос
/ 08 апреля 2019

У меня простое табличное представление, цвет фона заголовка раздела табличного представления ясен, есть ли способ скрыть ячейки под разделом при прокрутке?Пожалуйста, смотрите изображение ниже:

enter image description here

Вот реализация 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
}

Есть предложения?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...