mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(ios): actionbar show/hide should trigger page layout (#8726)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user