iOS 7 - 禁用UITabBarItem色调 [英] iOS 7 - Disable UITabBarItem tint color

查看:111
本文介绍了iOS 7 - 禁用UITabBarItem色调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有五个图标的UITabBar,其中大多数只有一种颜色是扁平的。但是,其中一个按钮不应该有浅色,因为它是公司的徽标,徽标有各种不同的颜色。我知道有可能使用UINavigationBar和UIToolbar(这是我正在使用的,这是一个可怕的解决方法)。

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).

我做了一些沉重的搜索并尝试了许多不同的解决方案(我想出了一些疯狂的解决方案),但它们似乎都不适用于iOS 7。有没有人知道如何实现这一目标?

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?

万分感谢!

推荐答案

使用ImageWithRenderingModeAlwaysOriginal。

use ImageWithRenderingModeAlwaysOriginal.

UIImage *icon = [[UIImage imageNamed:@"yourImage"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

这篇关于iOS 7 - 禁用UITabBarItem色调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆