Fix: Action-bar bg-color in ios not resetting

This commit is contained in:
vakrilov
2017-03-08 13:42:29 +02:00
parent b45cbe929b
commit e69bc78111
2 changed files with 7 additions and 9 deletions

View File

@ -21,7 +21,7 @@
<!-- status-bar-style - page - and - action-bar - background -->
<Button text="61" tap="applyTapOnStyledActionBar" tag="status-bar-style: light;background-color: #E0115F;" style.fontSize="8" width="40" height="40" automationText="light-bckg-yellow-abbckg-ruby" />
<Button text="62" tap="applyTapOnStyledActionBar" tag="status-bar-style: dark; ;background-color: #E0115F;" style.fontSize="8" width="40" height="40" automationText="dark-bckg-yellow-abbckg-ruby" />
<Button text="62" tap="applyTapOnStyledActionBar" tag="status-bar-style: dark;background-color: #E0115F;" style.fontSize="8" width="40" height="40" automationText="dark-bckg-yellow-abbckg-ruby" />
<!-- status-bar-style - action-bar - hidden - and - backgroundSpanUnderStatusBar -->
<Button text="71" tap="applyTapWithSpan" tag="status-bar-style: light;background-color: yellow" style.fontSize="8" width="40" height="40" automationText="dark-bckg-yellow-bckgsusb-true" />

View File

@ -323,15 +323,13 @@ export class ActionBar extends ActionBarBase {
}
get [backgroundColorProperty.native](): UIColor {
let navBar = this.navBar;
if (navBar) {
return navBar.barTintColor;
}
// This getter is never called.
// CssAnimationProperty use default value form their constructor.
return null;
}
set [backgroundColorProperty.native](value: UIColor | Color) {
let navBar = this.navBar;
if (navBar && value) {
if (navBar) {
let color = value instanceof Color ? value.ios : value;
navBar.barTintColor = color;
}