Fix button interactions

This commit is contained in:
Ali
2022-07-06 14:25:48 +02:00
parent d4f4e10761
commit 2377d3e08c
2 changed files with 6 additions and 2 deletions

View File

@@ -109,8 +109,11 @@ public final class ComponentHostView<EnvironmentType>: UIView {
if self.alpha.isZero {
return nil
}
if !self.isUserInteractionEnabled {
return nil
}
for view in self.subviews.reversed() {
if let result = view.hitTest(self.convert(point, to: view), with: event), result.isUserInteractionEnabled {
if view.isUserInteractionEnabled, view.alpha != 0.0, let result = view.hitTest(self.convert(point, to: view), with: event) {
return result
}
}