diff --git a/ui/core/view.ios.ts b/ui/core/view.ios.ts index 54fdb1b14..608dfac9a 100644 --- a/ui/core/view.ios.ts +++ b/ui/core/view.ios.ts @@ -274,10 +274,7 @@ export class View extends viewCommon.View { } private _onBoundsChanged() { - var bgColor = background.ios.createBackgroundUIColor(this); - if (bgColor) { - this._nativeView.backgroundColor = bgColor; - } + this.style._boundsChanged(); } } diff --git a/ui/styling/style.d.ts b/ui/styling/style.d.ts index 7695725b8..256cabe7e 100644 --- a/ui/styling/style.d.ts +++ b/ui/styling/style.d.ts @@ -71,6 +71,7 @@ declare module "ui/styling/style" { public _syncNativeProperties(): void; public _inheritStyleProperty(property: Property): void; public _inheritStyleProperties(): void; + public _boundsChanged(): void; } export function registerHandler(property: Property, handler: styling.stylers.StylePropertyChangedHandler, className?: string); diff --git a/ui/styling/style.ts b/ui/styling/style.ts index ceaf34822..78b7c3ce4 100644 --- a/ui/styling/style.ts +++ b/ui/styling/style.ts @@ -599,6 +599,10 @@ export class Style extends DependencyObservable implements styling.Style { }); } + public _boundsChanged() { + this._applyProperty(backgroundInternalProperty, this._getValue(backgroundInternalProperty)); + } + private _applyProperty(property: Property, newValue: any) { this._applyStyleProperty(property, newValue);