mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
fix-next: correct raising of layoutChanged event (#6457)
Currently the layoutChanged event can be raised even when there is no change due to safe area calculations.
This commit is contained in:
@ -154,7 +154,8 @@ export class View extends ViewCommon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public _setNativeViewFrame(nativeView: UIView, frame: CGRect): void {
|
public _setNativeViewFrame(nativeView: UIView, frame: CGRect): void {
|
||||||
if (!CGRectEqualToRect(nativeView.frame, frame)) {
|
let oldFrame = this._cachedFrame || nativeView.frame;
|
||||||
|
if (!CGRectEqualToRect(oldFrame, frame)) {
|
||||||
if (traceEnabled()) {
|
if (traceEnabled()) {
|
||||||
traceWrite(this + " :_setNativeViewFrame: " + JSON.stringify(ios.getPositionFromFrame(frame)), traceCategories.Layout);
|
traceWrite(this + " :_setNativeViewFrame: " + JSON.stringify(ios.getPositionFromFrame(frame)), traceCategories.Layout);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user