From 380673ef032b64d78417147e8cdcd7ed0e60d208 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Wed, 15 Apr 2020 16:37:37 +0800 Subject: [PATCH] iOS:fix getLocationOnScreen --- doric-iOS/Pod/Classes/Shader/DoricViewNode.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doric-iOS/Pod/Classes/Shader/DoricViewNode.m b/doric-iOS/Pod/Classes/Shader/DoricViewNode.m index 4c6f6d73..f0cf9793 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricViewNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricViewNode.m @@ -393,7 +393,7 @@ - (NSNumber *)getY { } - (NSDictionary *)getLocationOnScreen { - CGPoint point = [self.view convertPoint:CGPointMake(0, 0) toView:[UIApplication sharedApplication].windows.lastObject]; + CGPoint point = [self.view convertPoint:CGPointMake(0, 0) toView:[UIApplication sharedApplication].keyWindow]; return @{@"x": @(point.x), @"y": @(point.y)}; }