【问题标题】:How to make a UITabBarItem ignore the tintColor如何使 UITabBarItem 忽略 tintColor
【发布时间】:2016-10-31 11:18:22
【问题描述】:

我有一个UITabBar,有 5 个标签。

我将“unselectedImage”设置为 tabBarItem 的 image 属性,将“selectedImage”设置为 tabBarItem 的 selectedImage 属性。

“selectedImage”是带有渐变的图像,但它以tabBar.tintColor 的颜色呈现。

那么我怎样才能取消tintColor 并让原始图像呈现(不使用tintColor 着色)?

谢谢!

【问题讨论】:

    标签: ios objective-c swift cocoa-touch uitabbar


    【解决方案1】:

    设置图片时,定义rederingMode:

    yourUIImage.renderingMode = alwaysOriginal
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-01-22
      • 1970-01-01
      • 1970-01-01
      • 2014-11-12
      • 1970-01-01
      • 2013-06-15
      • 2019-09-09
      相关资源
      最近更新 更多