From 866068a77214c549c2002cdbe1e66f5fcd5231a6 Mon Sep 17 00:00:00 2001 From: garush13 <45408358+garush13@users.noreply.github.com> Date: Wed, 27 Jul 2022 23:50:57 +0400 Subject: [PATCH 1/2] Fix handling tap action when buttons are hidden --- LGPlusButtonsView/LGPlusButtonsView.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LGPlusButtonsView/LGPlusButtonsView.m b/LGPlusButtonsView/LGPlusButtonsView.m index 2f76fc2..8632c65 100644 --- a/LGPlusButtonsView/LGPlusButtonsView.m +++ b/LGPlusButtonsView/LGPlusButtonsView.m @@ -315,6 +315,9 @@ - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event for (LGPlusButton *button in _buttonsArray) { + if (!button.isShowing) { + continue; + } CGPoint newPoint = [self convertPoint:point toView:button]; view = [button hitTest:newPoint withEvent:event]; From bf4357ed9bd887267d5a1fd6de5ef4b2435c93f9 Mon Sep 17 00:00:00 2001 From: garush13 <45408358+garush13@users.noreply.github.com> Date: Tue, 2 Aug 2022 23:48:47 +0400 Subject: [PATCH 2/2] Fix hiding buttons with action --- LGPlusButtonsView/LGPlusButtonsView.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LGPlusButtonsView/LGPlusButtonsView.m b/LGPlusButtonsView/LGPlusButtonsView.m index 8632c65..c37ff0c 100644 --- a/LGPlusButtonsView/LGPlusButtonsView.m +++ b/LGPlusButtonsView/LGPlusButtonsView.m @@ -1274,7 +1274,9 @@ - (void)buttonAction:(LGPlusButton *)button else [self showButtonsAnimated:YES completionHandler:nil]; } - + if (index != 0) { + [self hideButtonsAnimated:YES completionHandler:nil]; + } // ----- if (_actionHandler) _actionHandler(self, button.titleLabel.text, description.text, button.tag);