MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / updateBackground

Method updateBackground

packages/core/ui/core/view/index.ios.ts:144–156  ·  view source on GitHub ↗
(sizeChanged: boolean, needsLayout: boolean)

Source from the content-addressed store, hash-verified

142 }
143
144 private updateBackground(sizeChanged: boolean, needsLayout: boolean): void {
145 if (sizeChanged) {
146 this._onSizeChanged();
147 } else if (this._nativeBackgroundState === 'invalid') {
148 const background = this.style.backgroundInternal;
149 this._redrawNativeBackground(background);
150 } else {
151 // Update layers that don't belong to view's layer (e.g. shadow layers)
152 if (needsLayout) {
153 this.layoutOuterShadows();
154 }
155 }
156 }
157
158 private layoutOuterShadows(): void {
159 const nativeView: NativeScriptUIView = <NativeScriptUIView>this.nativeViewProtected;

Callers 2

layoutMethod · 0.95
_setLayoutFlagsMethod · 0.95

Calls 3

_onSizeChangedMethod · 0.95
layoutOuterShadowsMethod · 0.95

Tested by

no test coverage detected