From 09d866cfcda7c0ea42622201eac50a1b8691a26b Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Tue, 21 Jul 2020 13:59:03 -0700 Subject: [PATCH] fix(ios): actionbar show/hide should trigger page layout (#8726) --- nativescript-core/ui/frame/frame.ios.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nativescript-core/ui/frame/frame.ios.ts b/nativescript-core/ui/frame/frame.ios.ts index 774c67c00..6b457f988 100644 --- a/nativescript-core/ui/frame/frame.ios.ts +++ b/nativescript-core/ui/frame/frame.ios.ts @@ -217,6 +217,8 @@ export class Frame extends FrameBase { this._ios._disableNavBarAnimation = true; } + // when showing/hiding navigationbar, the page needs a relayout to avoid overlapping or hidden layouts + const needsPageLayout = this._ios.showNavigationBar !== newValue; this._ios.showNavigationBar = newValue; if (disableNavBarAnimation) { @@ -226,6 +228,10 @@ export class Frame extends FrameBase { if (this._ios.controller.navigationBar) { this._ios.controller.navigationBar.userInteractionEnabled = this.navigationQueueIsEmpty(); } + + if (needsPageLayout && page) { + page.requestLayout(); + } } public _getNavBarVisible(page: Page): boolean {