diff --git a/tns-core-modules/ui/core/view/view-common.ts b/tns-core-modules/ui/core/view/view-common.ts index 7d8d20e0a..588f77456 100644 --- a/tns-core-modules/ui/core/view/view-common.ts +++ b/tns-core-modules/ui/core/view/view-common.ts @@ -892,14 +892,6 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition { return undefined; } - public getFullscreenArea(): any { - return undefined; - } - - public getSafeArea(): any { - return undefined; - } - public getLocationInWindow(): Point { return undefined; } diff --git a/tns-core-modules/ui/core/view/view.d.ts b/tns-core-modules/ui/core/view/view.d.ts index 1c6ae1746..e7449c696 100644 --- a/tns-core-modules/ui/core/view/view.d.ts +++ b/tns-core-modules/ui/core/view/view.d.ts @@ -541,16 +541,6 @@ export abstract class View extends ViewBase { */ 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. */ diff --git a/tns-core-modules/ui/core/view/view.ios.ts b/tns-core-modules/ui/core/view/view.ios.ts index 859edbd77..68842e9e8 100644 --- a/tns-core-modules/ui/core/view/view.ios.ts +++ b/tns-core-modules/ui/core/view/view.ios.ts @@ -237,8 +237,9 @@ export class View extends ViewCommon { const locationOnScreen = this.getLocationOnScreen(); if (locationOnScreen) { - const safeArea = this.getSafeArea(); - const fullscreen = this.getFullscreenArea(); + const parentWithController = ios.getParentWithViewController(this); + const safeArea = parentWithController.viewController.view.safeAreaLayoutGuide.layoutFrame; + const fullscreen = parentWithController.viewController.view.frame; const onScreenLeft = layout.round(layout.toDevicePixels(locationOnScreen.x)); const onScreenTop = layout.round(layout.toDevicePixels(locationOnScreen.y)); @@ -306,16 +307,6 @@ export class View extends ViewCommon { 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 { if (!this.nativeViewProtected || !this.nativeViewProtected.window) { return undefined;