From 10996a4b827ce12978eeabd80361463a532f1ba7 Mon Sep 17 00:00:00 2001 From: Alisa Mylnikova Date: Wed, 4 Apr 2018 14:09:53 +0700 Subject: [PATCH] Fix #285: Add method to MacawView to find node at specified location --- Source/views/MacawView.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/views/MacawView.swift b/Source/views/MacawView.swift index 8881da64..c93e571d 100644 --- a/Source/views/MacawView.swift +++ b/Source/views/MacawView.swift @@ -168,6 +168,11 @@ open class MacawView: MView, MGestureRecognizerDelegate { } MGraphicsEndImageContext() } + + public final func findNodeAt(location: CGPoint) -> Node? { + guard let ctx = context.cgContext else { return .none } + return renderer?.findNodeAt(location: location, ctx: ctx) + } // MARK: - Touches