diff --git a/packages/core/ui/core/view/index.ios.ts b/packages/core/ui/core/view/index.ios.ts index 7a1c87707..2f4cc7d9e 100644 --- a/packages/core/ui/core/view/index.ios.ts +++ b/packages/core/ui/core/view/index.ios.ts @@ -262,7 +262,9 @@ export class View extends ViewCommon implements ViewDefinition { if (majorVersion <= 10) { return null; } - + if (this.iosIgnoreSafeArea) { + return frame; + } if (!this.iosOverflowSafeArea || !this.iosOverflowSafeAreaEnabled) { return IOSHelper.shrinkToSafeArea(this, frame); } else if (this.nativeViewProtected && this.nativeViewProtected.window) { @@ -275,7 +277,9 @@ export class View extends ViewCommon implements ViewDefinition { public getSafeAreaInsets(): { left; top; right; bottom } { const safeAreaInsets = this.nativeViewProtected && this.nativeViewProtected.safeAreaInsets; const insets = { left: 0, top: 0, right: 0, bottom: 0 }; - + if (this.iosIgnoreSafeArea) { + return insets; + } if (safeAreaInsets) { insets.left = layout.round(layout.toDevicePixels(safeAreaInsets.left)); insets.top = layout.round(layout.toDevicePixels(safeAreaInsets.top)); diff --git a/packages/core/ui/core/view/view-common.ts b/packages/core/ui/core/view/view-common.ts index 6def02644..8649cfe8a 100644 --- a/packages/core/ui/core/view/view-common.ts +++ b/packages/core/ui/core/view/view-common.ts @@ -758,7 +758,8 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition { public isUserInteractionEnabled: boolean; public iosOverflowSafeArea: boolean; public iosOverflowSafeAreaEnabled: boolean; - + public iosIgnoreSafeArea: boolean; + get isLayoutValid(): boolean { return this._isLayoutValid; } @@ -1055,3 +1056,9 @@ export const iosOverflowSafeAreaEnabledProperty = new InheritedProperty