Cell appearance reseting fix

This commit is contained in:
Anton Popkov 2017-10-17 10:39:44 +03:00
parent a0511290c6
commit f60c94986a
2 changed files with 9 additions and 13 deletions

View File

@ -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())
}
}

View File

@ -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)
}
}