Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TabBarIOS.Item will not ignore tintColor even with renderAsOriginal #9965

Closed
qualifyapp opened this issue Sep 17, 2016 · 7 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@qualifyapp
Copy link

Issue Description

I've been attempting to get the TabBar for our application completed and I've been running into a bit of trouble with the Icons. I've looked all over the place for about two days and even through the UIExplorer demonstrations, all the way down to @urbancvek 's PR notes.

The Images are all rendered with a tint, and no color can be seen, transparency in the image is also filled by the tint.

Steps to Reproduce / Code Snippets

You can simply copy the Example from UI explorer to see the problem, however here's a screenshot. (Excuse the oversized icons)

Please note, Icons are Colored, and the messaging Icon should not be filled out, although it is with the gray unselected tint color, the selectedIcon is also filled out with the tintColor from the TabBar.

I've tried changing just renderAsOriginal to renderAsOriginal={true} as shown in the documentation that it is a boolean value, however this didn't have any effect.

screen shot 2016-09-17 at 12 35 24 pm

Expected Results

The images in the TabBarItem.IOS component should be rendered how they are designed when the renderAsOriginal prop is set to true, instead of being covered with a tint. Setting transparent to the tint color should not hide the Icon either, IMO.

Additional Information

  • React Native version: 0.33.0 problem persisted in 0.32.0
  • Platform(s) (iOS, Android, or both?): iOS
  • Operating System (macOS, Linux, or Windows?): macOS
@qualifyapp
Copy link
Author

I should add that this only appears to happen on iPhone5s and under.

@lacker
Copy link
Contributor

lacker commented Dec 15, 2016

Why are the images rendered with a tint? Is that how tab bars work by default on iOS?

@urbancvek
Copy link

@lacker yes. By default iOS takes an image and renders it as a template (UIImageRenderingModeAlwaysTemplate). I've then added a check here RCTTabBarItem.m at line 90 and 101 for renderAsOriginal prop which then sets the image to display as original (UIImageRenderingModeAlwaysOriginal).

@urbancvek
Copy link

Also @qualifyapp are you still having this issue or can we close it?

@XHTeng
Copy link

XHTeng commented Dec 27, 2016

I found that iPhone 5S and under will always run the self.barItem.image = _icon; ,not run self.barItem.image = [_icon imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; ,so I delete the judge ,but I don't know why is it ?

@ghost
Copy link

ghost commented Feb 21, 2017

I am also facing same problem on on iPhone5s and under(devices only, works fine on simulator). @XHTeng Have you found any work around for this problem?

@hramos hramos added the Icebox label Jul 21, 2017
@hramos
Copy link
Contributor

hramos commented Jul 21, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos hramos closed this as completed Jul 21, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Jul 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

6 participants