Cell appearance reseting fix
This commit is contained in:
parent
a0511290c6
commit
f60c94986a
|
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue