mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
remove getSafeArea and geFullscreen methods
This commit is contained in:
@@ -892,14 +892,6 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getFullscreenArea(): any {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
public getSafeArea(): any {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
public getLocationInWindow(): Point {
|
public getLocationInWindow(): Point {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
10
tns-core-modules/ui/core/view/view.d.ts
vendored
10
tns-core-modules/ui/core/view/view.d.ts
vendored
@@ -541,16 +541,6 @@ export abstract class View extends ViewBase {
|
|||||||
*/
|
*/
|
||||||
public getFrameFromPosition(position: { left, top, right, bottom }, insets?: { left, top }): any;
|
public getFrameFromPosition(position: { left, top, right, bottom }, insets?: { left, top }): any;
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the iOS safe area frame of the closest parent with UIViewController.
|
|
||||||
*/
|
|
||||||
public getSafeArea(): any;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the iOS frame of the closest parent with UIViewController.
|
|
||||||
*/
|
|
||||||
public getFullscreenArea(): any;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the location of this view in the window coordinate system.
|
* Returns the location of this view in the window coordinate system.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -237,8 +237,9 @@ export class View extends ViewCommon {
|
|||||||
const locationOnScreen = this.getLocationOnScreen();
|
const locationOnScreen = this.getLocationOnScreen();
|
||||||
|
|
||||||
if (locationOnScreen) {
|
if (locationOnScreen) {
|
||||||
const safeArea = this.getSafeArea();
|
const parentWithController = ios.getParentWithViewController(this);
|
||||||
const fullscreen = this.getFullscreenArea();
|
const safeArea = parentWithController.viewController.view.safeAreaLayoutGuide.layoutFrame;
|
||||||
|
const fullscreen = parentWithController.viewController.view.frame;
|
||||||
const onScreenLeft = layout.round(layout.toDevicePixels(locationOnScreen.x));
|
const onScreenLeft = layout.round(layout.toDevicePixels(locationOnScreen.x));
|
||||||
const onScreenTop = layout.round(layout.toDevicePixels(locationOnScreen.y));
|
const onScreenTop = layout.round(layout.toDevicePixels(locationOnScreen.y));
|
||||||
|
|
||||||
@@ -306,16 +307,6 @@ export class View extends ViewCommon {
|
|||||||
return CGRectMake(left, top, width, height);
|
return CGRectMake(left, top, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getFullscreenArea(): any {
|
|
||||||
const parentWithController = ios.getParentWithViewController(this);
|
|
||||||
return parentWithController.viewController.view.frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
public getSafeArea(): any {
|
|
||||||
const parentWithController = ios.getParentWithViewController(this);
|
|
||||||
return parentWithController.viewController.view.safeAreaLayoutGuide.layoutFrame;
|
|
||||||
}
|
|
||||||
|
|
||||||
public getLocationInWindow(): Point {
|
public getLocationInWindow(): Point {
|
||||||
if (!this.nativeViewProtected || !this.nativeViewProtected.window) {
|
if (!this.nativeViewProtected || !this.nativeViewProtected.window) {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user