Files
NativeScript/tns-core-modules/ui/layouts/layout-base.ios.ts
Hristo Hristov a35e603d85 Fix to always get the same bounds no matter if we are shown modally or not (for iOS).
Remove code that moves actionBar when there is incoming call. We now depend on the autolayout to position us correctly.
_addView, _removeView won't request layout for iOS.
LayoutBase: addChild & remvoeChild will request layout.
ContentView: content change will request layout.
2017-12-15 13:06:34 +02:00

37 lines
967 B
TypeScript

import { LayoutBaseCommon, clipToBoundsProperty, View } from "./layout-base-common";
export * from "./layout-base-common";
export class LayoutBase extends LayoutBaseCommon {
nativeViewProtected: UIView;
public addChild(child: View): void {
super.addChild(child);
this.requestLayout();
}
public insertChild(child: View, atIndex: number): void {
super.insertChild(child, atIndex);
this.requestLayout();
}
public removeChild(child: View): void {
super.removeChild(child);
this.requestLayout();
}
_setNativeClipToBounds() {
if (this.clipToBounds) {
this.nativeViewProtected.clipsToBounds = true;
} else {
super._setNativeClipToBounds();
}
}
[clipToBoundsProperty.getDefault](): boolean {
return false;
}
[clipToBoundsProperty.setNative](value: boolean) {
this._setNativeClipToBounds();
}
}