Skip to content

Commit 09fbf28

Browse files
committed
fix(tabs ios): selector and ripple color css
1 parent 0e0c20d commit 09fbf28

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/tabs/tabs.ios.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ export class Tabs extends TabsBase {
492492

493493
public _needsCacheUpdate = false;
494494
public _animateNextChange = true;
495+
private _selectionIndicatorColor: Color;
495496

496497
constructor() {
497498
super();
@@ -1084,13 +1085,13 @@ export class Tabs extends TabsBase {
10841085
this._ios.tabBar.setImageTintColorForState(nativeColor, UIControlState.Selected);
10851086
}
10861087

1087-
public getTabBarHighlightColor(): UIColor {
1088-
return this._ios.tabBar.tintColor;
1088+
public getTabBarHighlightColor(): Color {
1089+
return this._selectionIndicatorColor;
10891090
}
10901091

1091-
public setTabBarHighlightColor(value: UIColor | Color) {
1092-
const nativeColor = value instanceof Color ? value.ios : value;
1093-
this._ios.tabBar.tintColor = nativeColor;
1092+
public setTabBarHighlightColor(value: Color) {
1093+
this._selectionIndicatorColor = value;
1094+
this._ios.tabBar.selectionIndicatorStrokeColor = value.ios;
10941095
}
10951096

10961097
public getTabBarSelectedItemColor(): Color {
@@ -1122,8 +1123,8 @@ export class Tabs extends TabsBase {
11221123
});
11231124
}
11241125

1125-
[rippleColorProperty.setNative](value: UIColor | Color) {
1126-
this.setTabBarHighlightColor(value);
1126+
[rippleColorProperty.setNative](value: Color) {
1127+
this._ios.tabBar.rippleColor = value.ios;
11271128
}
11281129

11291130
[selectedIndexProperty.setNative](value: number) {

0 commit comments

Comments
 (0)