Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 7 - Disable UITabBarItem tint color

I have a UITabBar with five icons, most of them being flat with just one color. However, one of these buttons should not have a tint color, since it's the company's logo and the logo has various different colors. I know it's possible to to so with UINavigationBar and UIToolbar (which is what I'm using and it's a horrible workaround).

I did some heavy searching and tried many different solutions (I came up with with some crazy ones too), but none of them seem to work for me o iOS 7. Does anyone have an idea of how to achieve that?

Thanks a million!

like image 266
Marcos Duarte Avatar asked Jul 30 '14 08:07

Marcos Duarte


2 Answers

use ImageWithRenderingModeAlwaysOriginal.

UIImage *icon = [[UIImage imageNamed:@"yourImage"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
like image 169
Dávid Kaszás Avatar answered Nov 14 '22 09:11

Dávid Kaszás


You can also create 'Image Asset' and set it there in the 'Attributes Inspector' tab.

enter image description here

like image 38
Muhammed Tanriverdi Avatar answered Nov 14 '22 07:11

Muhammed Tanriverdi