diff --git a/Sources/Classes/Views/EmptyCell/EmptyCell.swift b/Sources/Classes/Views/EmptyCell/EmptyCell.swift index 02e50fb1..48ca97ab 100644 --- a/Sources/Classes/Views/EmptyCell/EmptyCell.swift +++ b/Sources/Classes/Views/EmptyCell/EmptyCell.swift @@ -34,25 +34,16 @@ public final class EmptyCell: SeparatorCell, AppearanceConfigurable, Configurabl } } - public override init(style: UITableViewCellStyle, reuseIdentifier: String?) { - super.init(style: style, reuseIdentifier: reuseIdentifier) - - setup() - } - - public required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - public func configure(appearance: Appearance) { selectionStyle = .none backgroundColor = .clear contentView.backgroundColor = appearance.color } - + public func configure(with _: Void) { } - - private func setup() { + + public override func prepareForReuse() { + super.prepareForReuse() configure(appearance: Appearance()) } } diff --git a/Sources/Classes/Views/SeparatorCell/SeparatorCell.swift b/Sources/Classes/Views/SeparatorCell/SeparatorCell.swift index faf4f647..8cb4db1e 100644 --- a/Sources/Classes/Views/SeparatorCell/SeparatorCell.swift +++ b/Sources/Classes/Views/SeparatorCell/SeparatorCell.swift @@ -180,5 +180,10 @@ open class SeparatorCell: UITableViewCell { bottomViewBottomConstraint = bottomView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor) bottomViewBottomConstraint.isActive = true } + + open override func prepareForReuse() { + super.prepareForReuse() + configureSeparator(with: .none) + } }