From bb9723bb287d54d6908b4fb7bc4595e53e0da11e Mon Sep 17 00:00:00 2001 From: Andrey Ovsyannikov Date: Fri, 17 Nov 2017 17:39:44 +0300 Subject: [PATCH 1/3] update constraints after setting insets --- LeadKit.podspec | 2 +- Sources/Classes/Views/SeparatorCell/SeparatorCell.swift | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/LeadKit.podspec b/LeadKit.podspec index b003b6c3..ee894d0a 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "0.6.2" + s.version = "0.6.3" 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" diff --git a/Sources/Classes/Views/SeparatorCell/SeparatorCell.swift b/Sources/Classes/Views/SeparatorCell/SeparatorCell.swift index 56e57912..7009d35f 100644 --- a/Sources/Classes/Views/SeparatorCell/SeparatorCell.swift +++ b/Sources/Classes/Views/SeparatorCell/SeparatorCell.swift @@ -144,12 +144,14 @@ open class SeparatorCell: UITableViewCell { topView.backgroundColor = configuration.color topSeparatorHeight = configuration.height topSeparatorInsets = configuration.insets ?? .zero + setNeedsUpdateConstraints() } private func updateBottomSeparator(with configuration: SeparatorConfiguration) { bottomView.backgroundColor = configuration.color bottomSeparatorHeight = configuration.height bottomSeparatorInsets = configuration.insets ?? .zero + setNeedsUpdateConstraints() } private func createConstraints() { From 7d41698b5964a2b43babfa627f7f7eed56df70f1 Mon Sep 17 00:00:00 2001 From: Andrey Ovsyannikov Date: Fri, 17 Nov 2017 17:43:56 +0300 Subject: [PATCH 2/3] change log updated --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71d618fd..549c3b66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.6.3 +- **Fix**: SeparatorCell updates constraints after setting separator insets + ## 0.6.2 - **Fix**: AlamofireManager extension no longer performs requests with default manager From 88e020e6e08bcc1e719e98ba53861eb8ee48f57c Mon Sep 17 00:00:00 2001 From: Andrey Ovsyannikov Date: Fri, 17 Nov 2017 17:58:22 +0300 Subject: [PATCH 3/3] setNeedsUpdateConstraints() moved to configureSeparator() --- Sources/Classes/Views/SeparatorCell/SeparatorCell.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/Classes/Views/SeparatorCell/SeparatorCell.swift b/Sources/Classes/Views/SeparatorCell/SeparatorCell.swift index 7009d35f..a1a2131c 100644 --- a/Sources/Classes/Views/SeparatorCell/SeparatorCell.swift +++ b/Sources/Classes/Views/SeparatorCell/SeparatorCell.swift @@ -47,15 +47,18 @@ open class SeparatorCell: UITableViewCell { topView.isHidden = true bottomView.isHidden = false updateBottomSeparator(with: configuration) + setNeedsUpdateConstraints() case .top(let configuration): topView.isHidden = false bottomView.isHidden = true updateTopSeparator(with: configuration) + setNeedsUpdateConstraints() case .full(let topConfiguration, let bottomConfiguration): topView.isHidden = false bottomView.isHidden = false updateTopSeparator(with: topConfiguration) updateBottomSeparator(with: bottomConfiguration) + setNeedsUpdateConstraints() } } @@ -144,14 +147,12 @@ open class SeparatorCell: UITableViewCell { topView.backgroundColor = configuration.color topSeparatorHeight = configuration.height topSeparatorInsets = configuration.insets ?? .zero - setNeedsUpdateConstraints() } private func updateBottomSeparator(with configuration: SeparatorConfiguration) { bottomView.backgroundColor = configuration.color bottomSeparatorHeight = configuration.height bottomSeparatorInsets = configuration.insets ?? .zero - setNeedsUpdateConstraints() } private func createConstraints() {