[TabBarIOS] Inactive tintColor
Would love the ability to customize the TabBar icon's inactive color from the default gray, similar to how you can set tintColor on TabBarIOS. Or even the ability to enable UIImageRenderingModeAlwaysOriginal on an image would be better than nothing. For a current workaround, I'm manually setting Render As: Original Image for each image set in Images.xcassets directly in Xcode.
@jdmaurer @christopherdro Is this feature still not implemented? I'd be willing to take a shot at it if so.
I have find a way to solve this.
first, In js TabBarIOS.Item component, add the selectedIcon like this
selectedIcon={require("image!tabbar_ic_massage_selected")}
second, search RCTTabBarItem.m in Xcode,
change line 54 from
UIImage *image = [RCTConvert UIImage:_icon];
to
UIImage *image = [[RCTConvert UIImage:_icon] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
i have some problem so i did not update to 0.19, i just in 0.13.2.
in the new version, it seems just change file RCTTabBarItem.m line 87 from
self.barItem.image = _icon;
to
self.barItem.image = [_icon imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
but i did not try it.
I'm manually setting Render As: Original Image for each image set in Images.xcassets directly in Xcode, But not become effective, why?
+1
I've just created a PR that solves this problem right here #7264 and it's waiting to be accepted. 😄
This issue is now resolved as my PR got accepted so it should probably be closed now.
Thanks @urbancvek !