0

I have been attempting to create a tabbed application with tab bar items that are custom images, but no matter what I do there is always a tint over it.

Is there any way to use the image and preserve all the original colors without it automatically covering it with a tint?

Thank you, any help is appreciated!

user2985289
  • 203
  • 1
  • 3
  • 10

1 Answers1

1

Here is the solution

[[UIView appearance] setTintColor:[UIColor clearColor]];
casillas
  • 16,351
  • 19
  • 115
  • 215
  • Thank you for the quick response! Would I put that in the `didFinishLaunchingWithOptions` function in the appDelegate? I tried something similar before (I set the tint of the UITabBarItem to clearColor), and it's gave the same result: when the item is selected it ends up being actually "clear"(look like there is no icon for the tab bar item), and when it is not selected it still has a grey tint but I can't see the original image since it is just a tint overlay of the image :( Is there something else I have to do? Or do I need to put that piece of code somewhere else? – user2985289 Mar 31 '15 at 02:06
  • Also, I'm using Swift, I don't think it would make a difference but maybe I messed up translating the code? `UIView.appearance().tintColor = UIColor.clearColor();` is what I think the Swift conversion would be – user2985289 Mar 31 '15 at 02:08