@@ -23,6 +23,7 @@ export class CheckBox extends Button implements CheckBoxInterface {
2323 private _hideBox : boolean ;
2424 private _boxType : number ;
2525 private _tint : string ;
26+ private _checkBoxBackgroundColor :string ;
2627 private _onCheckColor : string ;
2728 private _animationDuration : number ;
2829 private _onAnimationType : number ;
@@ -50,34 +51,33 @@ export class CheckBox extends Button implements CheckBoxInterface {
5051 this . _setValue ( CheckBox . checkedProperty , value ) ;
5152 }
5253
54+ set checkBoxBackgroundColor ( color :string ) {
55+ ( < any > this . _iosCheckbox ) . backgroundColor = new Color ( color ) . ios ;
56+ this . _checkBoxBackgroundColor = color ;
57+ }
5358 set fillColor ( color : string ) {
5459 this . _iosCheckbox . onFillColor = new Color ( color ) . ios ;
5560 this . _fillColor = color ;
5661 }
5762
5863 set tintColor ( color : string ) {
59- this . _tintColor = color ;
6064 this . _iosCheckbox . onTintColor = new Color ( color ) . ios ;
65+ this . _tintColor = color ;
6166 }
6267
6368 /* NATIVE PROPERTIES */
6469 set checkedAnimated ( value : boolean ) {
65- if ( this . _iosCheckbox )
66- this . _iosCheckbox . setOnAnimated ( value , true ) ;
70+ this . _iosCheckbox . setOnAnimated ( value , true ) ;
6771 }
6872
6973 set lineWidth ( value : number ) {
70- if ( this . _iosCheckbox )
71- this . _iosCheckbox . lineWidth = value ;
72- else
73- this . _lineWidth = value ;
74+ this . _iosCheckbox . lineWidth = value ;
75+ this . _lineWidth = value ;
7476 }
7577
7678 set hideBox ( value : boolean ) {
77- if ( this . _iosCheckbox )
78- this . _iosCheckbox . hideBox = value ;
79- else
80- this . _hideBox = value ;
79+ this . _iosCheckbox . hideBox = value ;
80+ this . _hideBox = value ;
8181 }
8282
8383 set boxType ( value : number ) {
@@ -92,24 +92,18 @@ export class CheckBox extends Button implements CheckBoxInterface {
9292 }
9393
9494 set tint ( color : string ) {
95- if ( this . _iosCheckbox )
96- this . _iosCheckbox . tintColor = new Color ( color ) . ios ;
97- else
98- this . _tint = color ;
95+ ( < any > this . _iosCheckbox ) . tintColor = new Color ( color ) . ios ;
96+ this . _tint = color ;
9997 }
10098
10199 set onCheckColor ( color : string ) {
102- if ( this . _iosCheckbox )
103- this . _iosCheckbox . onCheckColor = new Color ( color ) . ios ;
104- else
105- this . _onCheckColor = color ;
100+ this . _iosCheckbox . onCheckColor = new Color ( color ) . ios ;
101+ this . _onCheckColor = color ;
106102 }
107103
108104 set animationDuration ( value : number ) {
109- if ( this . _iosCheckbox )
110- this . _iosCheckbox . animationDuration = value ;
111- else
112- this . _animationDuration = value ;
105+ this . _iosCheckbox . animationDuration = value ;
106+ this . _animationDuration = value ;
113107 }
114108
115109 set onAnimationType ( value : number ) {
@@ -120,10 +114,8 @@ export class CheckBox extends Button implements CheckBoxInterface {
120114 }
121115
122116 set offAnimationType ( value : number ) {
123- if ( this . _iosCheckbox )
124- this . _iosCheckbox . offAnimationType = this . getAnimationType ( value ) ;
125- else
126- this . _offAnimationType = value ;
117+ this . _iosCheckbox . offAnimationType = this . getAnimationType ( value ) ;
118+ this . _offAnimationType = value ;
127119 }
128120
129121 get nativeiOSCheckBox ( ) {
@@ -181,6 +173,9 @@ export class CheckBox extends Button implements CheckBoxInterface {
181173 if ( typeof this . _onCheckColor !== 'undefined' ) {
182174 this . onCheckColor = this . _onCheckColor ;
183175 }
176+ if ( typeof this . _checkBoxBackgroundColor !== 'undefined' ) {
177+ this . checkBoxBackgroundColor = this . _checkBoxBackgroundColor ;
178+ }
184179 if ( typeof this . _fillColor !== 'undefined' ) {
185180 this . fillColor = this . _fillColor ;
186181 }
0 commit comments