Fix sparse node hit test

This commit is contained in:
Ilya Laktyushin
2021-11-13 01:05:58 +04:00
parent 4930778807
commit 01774638f0

View File

@@ -6,6 +6,9 @@ private var backArrowImageCache: [Int32: UIImage] = [:]
public final class SparseNode: ASDisplayNode {
override public func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
if self.alpha.isZero {
return nil
}
for view in self.view.subviews {
if let result = view.hitTest(self.view.convert(point, to: view), with: event), result.isUserInteractionEnabled {
return result