From 241e7c211e9620a48f27b9797ac31f10ba9ab8da Mon Sep 17 00:00:00 2001 From: Yurii Pakhomov Date: Tue, 12 Apr 2022 18:12:38 +0300 Subject: [PATCH 1/2] fix: gray table section background --- CHANGELOG.md | 5 ++++ LeadKit.podspec | 2 +- TIFoundationUtils/TIFoundationUtils.podspec | 2 +- TIKeychainUtils/TIKeychainUtils.podspec | 2 +- TIMoyaNetworking/TIMoyaNetworking.podspec | 2 +- TINetworking/TINetworking.podspec | 2 +- TISwiftUtils/TISwiftUtils.podspec | 2 +- .../TableSection+Extensions.swift | 24 +++++++++++++++++-- TITableKitUtils/TITableKitUtils.podspec | 2 +- TITransitions/TITransitions.podspec | 2 +- TIUIElements/TIUIElements.podspec | 2 +- TIUIKitCore/TIUIKitCore.podspec | 2 +- 12 files changed, 37 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3e8a27f..acc78d25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +### 1.14.3 + +- **Fix**: Creating headerView and footerView when initializing a section with rows in `TITableKitUtils`. +- **Add**: Empty table section initialization method in `TITableKitUtils`. + ### 1.14.2 - **Update**: DateFormatters properties preset in reuse pools diff --git a/LeadKit.podspec b/LeadKit.podspec index 63934dd6..dcd2c437 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "1.14.2" + s.version = "1.14.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/TIFoundationUtils/TIFoundationUtils.podspec b/TIFoundationUtils/TIFoundationUtils.podspec index d06e417e..7fd15c61 100644 --- a/TIFoundationUtils/TIFoundationUtils.podspec +++ b/TIFoundationUtils/TIFoundationUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIFoundationUtils' - s.version = '1.14.2' + s.version = '1.14.3' s.summary = 'Set of helpers for Foundation framework classes.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIKeychainUtils/TIKeychainUtils.podspec b/TIKeychainUtils/TIKeychainUtils.podspec index 362ec6df..caf0d2e9 100644 --- a/TIKeychainUtils/TIKeychainUtils.podspec +++ b/TIKeychainUtils/TIKeychainUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIKeychainUtils' - s.version = '1.14.2' + s.version = '1.14.3' s.summary = 'Set of helpers for Keychain classes.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIMoyaNetworking/TIMoyaNetworking.podspec b/TIMoyaNetworking/TIMoyaNetworking.podspec index 80f1d7ed..29415d8a 100644 --- a/TIMoyaNetworking/TIMoyaNetworking.podspec +++ b/TIMoyaNetworking/TIMoyaNetworking.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIMoyaNetworking' - s.version = '1.14.2' + s.version = '1.14.3' s.summary = 'Moya + Swagger network service.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TINetworking/TINetworking.podspec b/TINetworking/TINetworking.podspec index b3cf90f5..0057a4a0 100644 --- a/TINetworking/TINetworking.podspec +++ b/TINetworking/TINetworking.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TINetworking' - s.version = '1.14.2' + s.version = '1.14.3' s.summary = 'Swagger-frendly networking layer helpers.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TISwiftUtils/TISwiftUtils.podspec b/TISwiftUtils/TISwiftUtils.podspec index 6ac02a1a..979c5d21 100644 --- a/TISwiftUtils/TISwiftUtils.podspec +++ b/TISwiftUtils/TISwiftUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TISwiftUtils' - s.version = '1.14.2' + s.version = '1.14.3' s.summary = 'Bunch of useful helpers for Swift development.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TITableKitUtils/Sources/Extensions/TableSection/TableSection+Extensions.swift b/TITableKitUtils/Sources/Extensions/TableSection/TableSection+Extensions.swift index eda00808..ac0c5523 100644 --- a/TITableKitUtils/Sources/Extensions/TableSection/TableSection+Extensions.swift +++ b/TITableKitUtils/Sources/Extensions/TableSection/TableSection+Extensions.swift @@ -30,10 +30,30 @@ public extension TableSection { convenience init(onlyRows rows: [Row]) { self.init(rows: rows) - self.headerView = nil - self.footerView = nil + if #available(iOS 15, *) { + self.headerView = nil + self.footerView = nil + } else { + self.headerView = UIView() + self.footerView = UIView() + } self.headerHeight = .leastNonzeroMagnitude self.footerHeight = .leastNonzeroMagnitude } + + /// Initializes an empty section. + static func nilSection() -> TableSection { + let tableSection = TableSection() + + if #available(iOS 15, *) { + tableSection.headerView = nil + tableSection.footerView = nil + } else { + tableSection.headerView = UIView() + tableSection.footerView = UIView() + } + + return tableSection + } } diff --git a/TITableKitUtils/TITableKitUtils.podspec b/TITableKitUtils/TITableKitUtils.podspec index e3295b6d..76119bb9 100644 --- a/TITableKitUtils/TITableKitUtils.podspec +++ b/TITableKitUtils/TITableKitUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TITableKitUtils' - s.version = '1.14.2' + s.version = '1.14.3' s.summary = 'Set of helpers for TableKit classes.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TITransitions/TITransitions.podspec b/TITransitions/TITransitions.podspec index a8ce1fc1..3046806f 100644 --- a/TITransitions/TITransitions.podspec +++ b/TITransitions/TITransitions.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TITransitions' - s.version = '1.14.2' + s.version = '1.14.3' s.summary = 'Set of custom transitions to present controller. ' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIUIElements/TIUIElements.podspec b/TIUIElements/TIUIElements.podspec index 8ea273a7..5fcd3f57 100644 --- a/TIUIElements/TIUIElements.podspec +++ b/TIUIElements/TIUIElements.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIUIElements' - s.version = '1.14.2' + s.version = '1.14.3' s.summary = 'Bunch of useful protocols and views.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIUIKitCore/TIUIKitCore.podspec b/TIUIKitCore/TIUIKitCore.podspec index 48bfc0e2..edcf36d2 100644 --- a/TIUIKitCore/TIUIKitCore.podspec +++ b/TIUIKitCore/TIUIKitCore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIUIKitCore' - s.version = '1.14.2' + s.version = '1.14.3' s.summary = 'Core UI elements: protocols, views and helpers.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } From cb50db9f3403981718a367615f22cb606a2fd812 Mon Sep 17 00:00:00 2001 From: Yurii Pakhomov Date: Tue, 12 Apr 2022 18:39:42 +0300 Subject: [PATCH 2/2] fix: renamed empty table section creating method --- .../Extensions/TableSection/TableSection+Extensions.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TITableKitUtils/Sources/Extensions/TableSection/TableSection+Extensions.swift b/TITableKitUtils/Sources/Extensions/TableSection/TableSection+Extensions.swift index ac0c5523..d3e5d24f 100644 --- a/TITableKitUtils/Sources/Extensions/TableSection/TableSection+Extensions.swift +++ b/TITableKitUtils/Sources/Extensions/TableSection/TableSection+Extensions.swift @@ -43,7 +43,7 @@ public extension TableSection { } /// Initializes an empty section. - static func nilSection() -> TableSection { + static func emptySection() -> TableSection { let tableSection = TableSection() if #available(iOS 15, *) {