Reputation: 1338
I want to add special icon with 2 color in the tab bar but the app detect just one color I used lots of single color icons and there is no problem with them but this icon won't show as I want to be
here is the image of that Icon
the tabor background is white
Upvotes: 0
Views: 198
Reputation: 2513
Try to set color you want using this code.
UITabBar.appearance().tintColor = .red
Or you can tell the system to keep the original rendering mode, so it does not use default colors. Set image like that.
... = UIImage(named:"myImage.png")?.withRenderingMode(.alwaysOriginal)
Upvotes: 0
Reputation: 773
If you are using image assets then change the render option as Original Image instead of Default.
Otherwise change the tint color of tabor to clear.
Upvotes: 0