diff --git a/LGPlusButtonsView/LGPlusButtonsView.m b/LGPlusButtonsView/LGPlusButtonsView.m index 2f76fc2..c37ff0c 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]; @@ -1271,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);