Cell first appearance setup fix

This commit is contained in:
Anton Popkov 2017-10-17 15:28:41 +03:00
parent 13485bea57
commit 425e8f6dad
1 changed files with 15 additions and 0 deletions

View File

@ -34,6 +34,16 @@ public final class EmptyCell: SeparatorCell, AppearanceConfigurable, Configurabl
}
}
public override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
resetAppearance()
}
public required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
public func configure(appearance: Appearance) {
selectionStyle = .none
backgroundColor = .clear
@ -44,6 +54,11 @@ public final class EmptyCell: SeparatorCell, AppearanceConfigurable, Configurabl
public override func prepareForReuse() {
super.prepareForReuse()
resetAppearance()
}
private func resetAppearance() {
configure(appearance: Appearance())
}