react-native icon indicating copy to clipboard operation
react-native copied to clipboard

[TabBarIOS] Inactive tintColor

Open jsonmaur opened this issue 11 years ago • 7 comments

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.

jsonmaur avatar Sep 28 '15 03:09 jsonmaur

@jdmaurer @christopherdro Is this feature still not implemented? I'd be willing to take a shot at it if so.

austingreendev avatar Jan 06 '16 04:01 austingreendev

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.

h3l avatar Jan 29 '16 03:01 h3l

I'm manually setting Render As: Original Image for each image set in Images.xcassets directly in Xcode, But not become effective, why?

atlas1119 avatar Feb 03 '16 11:02 atlas1119

+1

bsinc avatar Apr 18 '16 21:04 bsinc

I've just created a PR that solves this problem right here #7264 and it's waiting to be accepted. 😄

urbancvek avatar Apr 27 '16 19:04 urbancvek

This issue is now resolved as my PR got accepted so it should probably be closed now.

urbancvek avatar May 04 '16 16:05 urbancvek

Thanks @urbancvek !

janicduplessis avatar May 12 '16 07:05 janicduplessis