mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Fixed iOS layout
This commit is contained in:
@ -196,10 +196,6 @@ export class Frame extends frameCommon.Frame {
|
|||||||
this._heightMeasureSpec = heightMeasureSpec;
|
this._heightMeasureSpec = heightMeasureSpec;
|
||||||
|
|
||||||
let result = this.measurePage(this.currentPage);
|
let result = this.measurePage(this.currentPage);
|
||||||
if (this._navigateToEntry && this.currentPage) {
|
|
||||||
this.measurePage(this._navigateToEntry.resolvedPage);
|
|
||||||
}
|
|
||||||
|
|
||||||
let widthAndState = view.View.resolveSizeAndState(result.measuredWidth, width, widthMode, 0);
|
let widthAndState = view.View.resolveSizeAndState(result.measuredWidth, width, widthMode, 0);
|
||||||
let heightAndState = view.View.resolveSizeAndState(result.measuredHeight, height, heightMode, 0);
|
let heightAndState = view.View.resolveSizeAndState(result.measuredHeight, height, heightMode, 0);
|
||||||
|
|
||||||
@ -224,9 +220,6 @@ export class Frame extends frameCommon.Frame {
|
|||||||
this._layoutWidth = right - left;
|
this._layoutWidth = right - left;
|
||||||
this._layoutheight = bottom - top;
|
this._layoutheight = bottom - top;
|
||||||
this.layoutPage(this.currentPage);
|
this.layoutPage(this.currentPage);
|
||||||
if (this._navigateToEntry && this.currentPage) {
|
|
||||||
this.layoutPage(this._navigateToEntry.resolvedPage);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public layoutPage(page: pages.Page): void {
|
public layoutPage(page: pages.Page): void {
|
||||||
@ -363,6 +356,9 @@ class UINavigationControllerImpl extends UINavigationController implements UINav
|
|||||||
frame._navigateToEntry = null;
|
frame._navigateToEntry = null;
|
||||||
frame._currentEntry = newEntry;
|
frame._currentEntry = newEntry;
|
||||||
|
|
||||||
|
frame.measurePage(newPage);
|
||||||
|
frame.layoutPage(newPage);
|
||||||
|
|
||||||
// In iOS we intentionally delay the raising of the 'loaded' event so both platforms behave identically.
|
// In iOS we intentionally delay the raising of the 'loaded' event so both platforms behave identically.
|
||||||
// The loaded event must be raised AFTER the page is part of the windows hierarchy and
|
// The loaded event must be raised AFTER the page is part of the windows hierarchy and
|
||||||
// frame.topmost().currentPage is set to the page instance.
|
// frame.topmost().currentPage is set to the page instance.
|
||||||
|
Reference in New Issue
Block a user