File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ - (void)applyOptions:(RNNNavigationOptions *)options {
3535 translucent: [withDefault.bottomTabs.translucent withDefault: NO ]];
3636 [self applyTabBarBorder: withDefault.bottomTabs];
3737 [self applyTabBarShadow: withDefault.bottomTabs.shadow];
38+
39+ UIColor *tintColor = [withDefault.bottomTabs.tintColor withDefault: nil ];
40+ if (tintColor) {
41+ self.tabBar .tintColor = tintColor;
42+ }
3843}
3944
4045- (void )mergeOptions : (RNNNavigationOptions *)mergeOptions
@@ -94,6 +99,10 @@ - (void)mergeOptions:(RNNNavigationOptions *)mergeOptions
9499 if (mergeOptions.bottomTabs .shadow .hasValue ) {
95100 [self applyTabBarShadow: withDefault.bottomTabs.shadow];
96101 }
102+
103+ if (mergeOptions.bottomTabs .tintColor .hasValue ) {
104+ self.tabBar .tintColor = mergeOptions.bottomTabs .tintColor .get ;
105+ }
97106}
98107
99108- (RNNBottomTabsController *)tabBarController {
Original file line number Diff line number Diff line change 2323@property (nonatomic , strong ) Number *borderWidth;
2424@property (nonatomic , strong ) RNNShadowOptions *shadow;
2525@property (nonatomic , strong ) BottomTabsAttachMode *tabsAttachMode;
26+ @property (nonatomic , strong ) Color *tintColor;
2627
2728- (BOOL )shouldDrawBehind ;
2829
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ - (instancetype)initWithDict:(NSDictionary *)dict {
2626 self.borderColor = [ColorParser parse: dict key: @" borderColor" ];
2727 self.borderWidth = [NumberParser parse: dict key: @" borderWidth" ];
2828 self.shadow = [[RNNShadowOptions alloc ] initWithDict: dict[@" shadow" ]];
29+ self.tintColor = [ColorParser parse: dict key: @" tintColor" ];
2930
3031 return self;
3132}
@@ -68,6 +69,9 @@ - (void)mergeOptions:(RNNBottomTabsOptions *)options {
6869 if (options.borderWidth .hasValue )
6970 self.borderWidth = options.borderWidth ;
7071
72+ if (options.tintColor .hasValue )
73+ self.tintColor = options.tintColor ;
74+
7175 [self .shadow mergeOptions: options.shadow];
7276}
7377
Original file line number Diff line number Diff line change @@ -999,6 +999,16 @@ export interface OptionsBottomTabs {
999999 * Control the shadow of the Bottom tabs bar
10001000 */
10011001 shadow ?: ShadowOptions ;
1002+ /**
1003+ * Set the tint color applied to the selected tab's icon
1004+ * and system-provided items. Maps to `UITabBar.tintColor`.
1005+ *
1006+ * Useful for overriding the default blue tint on system
1007+ * items created via `bottomTab.role`.
1008+ *
1009+ * #### (iOS specific)
1010+ */
1011+ tintColor ?: Color ;
10021012}
10031013
10041014export interface ShadowOptions {
You can’t perform that action at this time.
0 commit comments