remove getSafeArea and geFullscreen methods

This commit is contained in:
Martin Yankov
2018-08-24 17:16:09 +03:00
parent bda2dacdf3
commit 261d94037f
3 changed files with 3 additions and 30 deletions

View File

@@ -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;
}

View File

@@ -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.
*/

View File

@@ -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;