This commit is contained in:
Ali
2021-04-25 23:08:18 +04:00
parent d882e72f14
commit 09576bb391
8 changed files with 54 additions and 3 deletions

View File

@@ -24,10 +24,27 @@ public final class ContextExtractedContentContainingNode: ASDisplayNode {
self.addSubnode(self.contentNode)
}
public override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
if self.contentNode.supernode === self {
return self.contentNode.hitTest(self.view.convert(point, to: self.contentNode.view), with: event)
} else {
return nil
}
}
}
public final class ContextExtractedContentNode: ASDisplayNode {
public var customHitTest: ((CGPoint) -> UIView?)?
public override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
let result = self.view.hitTest(point, with: event)
if result === self.view {
return nil
} else {
return result
}
}
}
public final class ContextControllerContentNode: ASDisplayNode {