mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix iOS 10 fictional safe area layout
This commit is contained in:
@@ -93,7 +93,9 @@ export class View extends ViewCommon {
|
||||
|
||||
if (boundsChanged || (this._privateFlags & PFLAG_LAYOUT_REQUIRED) === PFLAG_LAYOUT_REQUIRED) {
|
||||
let position = { left, top, right, bottom };
|
||||
if (this.nativeViewProtected) {
|
||||
if (this.nativeViewProtected && majorVersion > 10) {
|
||||
// on iOS 11+ it is possible to have a changed layout frame due to safe area insets
|
||||
// get the frame and adjust the position, so that onLayout works correctly
|
||||
const frame = this.nativeViewProtected.frame;
|
||||
position = this.getPositionFromFrame(frame);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user