没设置之前的:
未选中状态选中状态
Mode.alwaysOriginal)
设置tabBarItem.image图片渲染模式 imageWithRenderingMode属性为UIImageRenderingModeAlwaysOriginal ,即可使图片显示原始状态
self.tabBarItem.selectedImage = #imageLiteral(resourceName: "Unknown").withRenderingMode(UIImageRendering
self.tabBarItem.image = #imageLiteral(resourceName: "cat01").withRenderingMode(UIImageRenderingMode.alwaysOriginal)
设置之后的:
颜色猫
颜色猫
网友评论