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

Issue with icon color #30

Closed
chenk1 opened this issue Jun 15, 2015 · 9 comments
Closed

Issue with icon color #30

chenk1 opened this issue Jun 15, 2015 · 9 comments

Comments

@chenk1
Copy link

chenk1 commented Jun 15, 2015

Hi,
I'm having a little issue with the icon's color.
Before a tab bar is selected, its icon's color is wrong.

For example: my TextColor is dark grey, and my TextSelectedColor and IconSelectedColor are white.
Before I select a tab bar it appears with dark grey text (which is correct) and white icon (which is wrong).

screen shot 2015-06-15 at 9 33 11 am

Have I configured something wrong? Or is it a bug?
Thanks!

@carolinapocket
Copy link

I'm having the same issue 😑

@aramikg
Copy link

aramikg commented Jul 16, 2015

I'm having a similar issue... All by icons are blue and text are black. when I first run the app the selected icon is black instead of blue. When I go to another tab then it fixes itself.

@aalzanki
Copy link

I fixed this in my fork and sent a pull request. For the meantime, here it is: https://github.com/aalzanki/animated-tab-bar

@aminiz
Copy link

aminiz commented Oct 6, 2015

There are a lot of changes in your fork that are not needed for this fix.

Here is the fix. Go into RAMAnimatedTabBarController.swift.

  1. Set your deselected color @IBInspectable var textColor = myDeselectedColorWhichIsLikelyAShadeOfGray
  2. Replace the following code:
            let icon = UIImageView(image: item.image)
            icon.translatesAutoresizingMaskIntoConstraints = false
            icon.tintColor = UIColor.clearColor()

With this:

            let renderImage = item.image?.imageWithRenderingMode(.AlwaysTemplate)
            let icon = UIImageView(image: renderImage)
            icon.translatesAutoresizingMaskIntoConstraints = false
            icon.image = renderImage
            icon.tintColor = item.textColor

@trungnguyen1791
Copy link

Actually those change only fixes "rotation item" color. With other type of animations. Its doesn't work :(

@muhasturk
Copy link

This problem is still here

@0ber
Copy link
Contributor

0ber commented Dec 19, 2015

Fixed

@0ber 0ber closed this as completed Dec 19, 2015
@peebits
Copy link

peebits commented Feb 26, 2016

i want to change selected image of tab bar item. In fact i had applied tabbar.selected Image Property

@YERUVAKONIREDDY
Copy link

I am not getting what people are saying .I have two assets not selected and selected icons for Tab Bar Item Images .I am adding selected image and unselected image to the Tab bar item but after running I am getting selected image colour changing.i checked my assets I don't have that king of blue colour selected asset mine is pink colour
assets
selected
unselected

can you help me is anything wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants