feat:add getX and getY for view
This commit is contained in:
@@ -319,6 +319,14 @@ - (NSNumber *)getHeight {
|
||||
return @(self.view.height);
|
||||
}
|
||||
|
||||
- (NSNumber *)getX {
|
||||
return @(self.view.x);
|
||||
}
|
||||
|
||||
- (NSNumber *)getY {
|
||||
return @(self.view.y);
|
||||
}
|
||||
|
||||
- (NSDictionary *)getLocationOnScreen {
|
||||
CGPoint point = [self.view convertPoint:CGPointMake(0, 0) toView:[UIApplication sharedApplication].windows.lastObject];
|
||||
return @{@"x": @(point.x), @"y": @(point.y)};
|
||||
|
Reference in New Issue
Block a user