如何使 UITabBarItem 忽略 tintColor

How to make a UITabBarItem ignore the tintColor

我有一个 UITabBar 有 5 个标签。

我将 "unselectedImage" 设置为 tabBarItem 的 image 属性 并将 "selectedImage" 设置为 tabBarItem 的 selectedImage 属性.

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

那么如何取消 tintColor 并使原始图像呈现(不使用 tintColor 着色)?

谢谢!

设置图片时,定义rederingMode:

yourUIImage.renderingMode = alwaysOriginal