From 425e8f6dadfae3e2295cad80f9636e60dbf04c65 Mon Sep 17 00:00:00 2001 From: Anton Popkov Date: Tue, 17 Oct 2017 15:28:41 +0300 Subject: [PATCH 1/2] Cell first appearance setup fix --- Sources/Classes/Views/EmptyCell/EmptyCell.swift | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Sources/Classes/Views/EmptyCell/EmptyCell.swift b/Sources/Classes/Views/EmptyCell/EmptyCell.swift index 37293886..f6c5f909 100644 --- a/Sources/Classes/Views/EmptyCell/EmptyCell.swift +++ b/Sources/Classes/Views/EmptyCell/EmptyCell.swift @@ -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()) } From c47c12f4dc2ce06a61f86c5728b67370093fd753 Mon Sep 17 00:00:00 2001 From: Anton Popkov Date: Tue, 17 Oct 2017 15:30:06 +0300 Subject: [PATCH 2/2] Changelog and podspec update --- CHANGELOG.md | 3 +++ LeadKit.podspec | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce15d4af..2066e38e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,3 +53,6 @@ ## 0.5.17 - **Fix**: EmptyCell reusing appearance fix - **Fix**: SeparatorCell reusing separators fix + +## 0.5.18 +- **Fix**: EmptyCell first appearance setup fix diff --git a/LeadKit.podspec b/LeadKit.podspec index 8d7fc476..3672e1da 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "0.5.17" + s.version = "0.5.18" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKit" s.license = "Apache License, Version 2.0"