mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Fix touches
This commit is contained in:
parent
816632ae38
commit
d12103c553
1 changed files with 16 additions and 0 deletions
|
|
@ -638,9 +638,25 @@ public final class GlassBackgroundContainerView: UIView {
|
|||
}
|
||||
|
||||
override public func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
||||
if self.alpha.isZero {
|
||||
return nil
|
||||
}
|
||||
if self.isHidden {
|
||||
return nil
|
||||
}
|
||||
if !self.isUserInteractionEnabled {
|
||||
return nil
|
||||
}
|
||||
for view in self.contentView.subviews.reversed() {
|
||||
if let result = view.hitTest(self.convert(point, to: view), with: event), result.isUserInteractionEnabled {
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
guard let result = self.contentView.hitTest(point, with: event) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue