From 3e64b5cc4e1b57d19cb55363586287ba11772f25 Mon Sep 17 00:00:00 2001 From: b0sya Date: Tue, 16 Mar 2021 15:31:31 +0300 Subject: [PATCH 1/4] fix: fix StatefullButton propagation --- TIUIElements/Sources/Views/StatefulButton/StatefulButton.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TIUIElements/Sources/Views/StatefulButton/StatefulButton.swift b/TIUIElements/Sources/Views/StatefulButton/StatefulButton.swift index 9a44a809..f91a2d76 100644 --- a/TIUIElements/Sources/Views/StatefulButton/StatefulButton.swift +++ b/TIUIElements/Sources/Views/StatefulButton/StatefulButton.swift @@ -143,7 +143,7 @@ open class StatefulButton: UIButton { let shouldPropagateEvent = eventPropagations[state] ?? true - if pointInsideView && touchEventReceiver == nil && !shouldPropagateEvent { + if pointInsideView && touchEventReceiver == nil && !shouldPropagateEvent && !isHidden { return self // disable propagation } From 8655c90f1d26e90eb2baf71deb8ad96fba557c82 Mon Sep 17 00:00:00 2001 From: b0sya Date: Tue, 16 Mar 2021 16:11:02 +0300 Subject: [PATCH 2/4] refactor: change disabling propagation condition --- .../Sources/Views/StatefulButton/StatefulButton.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TIUIElements/Sources/Views/StatefulButton/StatefulButton.swift b/TIUIElements/Sources/Views/StatefulButton/StatefulButton.swift index f91a2d76..8d0fcd6f 100644 --- a/TIUIElements/Sources/Views/StatefulButton/StatefulButton.swift +++ b/TIUIElements/Sources/Views/StatefulButton/StatefulButton.swift @@ -141,9 +141,9 @@ open class StatefulButton: UIButton { let touchEventReceiver = super.hitTest(point, with: event) - let shouldPropagateEvent = eventPropagations[state] ?? true + let shouldPropagateEvent = (eventPropagations[state] ?? true) || isHidden - if pointInsideView && touchEventReceiver == nil && !shouldPropagateEvent && !isHidden { + if pointInsideView && touchEventReceiver == nil && !shouldPropagateEvent { return self // disable propagation } From 6c8ff3e6821616954cdb07ff678259f421124b12 Mon Sep 17 00:00:00 2001 From: b0sya Date: Tue, 16 Mar 2021 16:29:55 +0300 Subject: [PATCH 3/4] build: bump version number --- LeadKit.podspec | 2 +- TIFoundationUtils/TIFoundationUtils.podspec | 2 +- TISwiftUtils/TISwiftUtils.podspec | 2 +- TITableKitUtils/TITableKitUtils.podspec | 2 +- TITransitions/TITransitions.podspec | 2 +- TIUIElements/TIUIElements.podspec | 2 +- TIUIKitCore/TIUIKitCore.podspec | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/LeadKit.podspec b/LeadKit.podspec index 2fea1c32..4d7ffe43 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "1.0.0" + s.version = "1.1.1" 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 b7f14adb..89acf69b 100644 --- a/TIFoundationUtils/TIFoundationUtils.podspec +++ b/TIFoundationUtils/TIFoundationUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIFoundationUtils' - s.version = '1.1.0' + s.version = '1.1.1' 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/TISwiftUtils/TISwiftUtils.podspec b/TISwiftUtils/TISwiftUtils.podspec index ed4a5a5f..1cd832d3 100644 --- a/TISwiftUtils/TISwiftUtils.podspec +++ b/TISwiftUtils/TISwiftUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TISwiftUtils' - s.version = '1.1.0' + s.version = '1.1.1' 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/TITableKitUtils.podspec b/TITableKitUtils/TITableKitUtils.podspec index 10d99cb0..d8bd1cf1 100644 --- a/TITableKitUtils/TITableKitUtils.podspec +++ b/TITableKitUtils/TITableKitUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TITableKitUtils' - s.version = '1.1.0' + s.version = '1.1.1' 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 25a82acb..eaee010e 100644 --- a/TITransitions/TITransitions.podspec +++ b/TITransitions/TITransitions.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TITransitions' - s.version = '1.0.0' + s.version = '1.1.1' 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 d082279b..9c7f3e18 100644 --- a/TIUIElements/TIUIElements.podspec +++ b/TIUIElements/TIUIElements.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIUIElements' - s.version = '1.1.0' + s.version = '1.1.1' 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 ae1ed28a..68d308f7 100644 --- a/TIUIKitCore/TIUIKitCore.podspec +++ b/TIUIKitCore/TIUIKitCore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIUIKitCore' - s.version = '1.1.0' + s.version = '1.1.1' 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 e87173b166051db5d7339d144b3ae07de6fe8533 Mon Sep 17 00:00:00 2001 From: b0sya Date: Tue, 16 Mar 2021 16:32:33 +0300 Subject: [PATCH 4/4] docs: update CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2a44a0f..72db96a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### 1.1.1 +- **Fix**: `StatefullButton` propagation + ### 1.1.0 - **Add**: `BaseInitializeableViewController`, `BaseCustomViewController` and `BaseViewController` to TIUIKitCore. - **Add**: `TableKitTableView` and `TableDirectorHolder` to TITableKitUtils.