I have icons for the tab bar in PNG format and the colors I need are already set there. But when I assign these icons to tab bar items, xcode takes only their alpha channel, and substitutes its colors. The default color is gray. I have the color of the tab of the bar itself dark turquoise and gray on it looks "pull out your eyes."

Is there an easy way to set a mode so that the colors of the image are displayed, not the default colors? Something I can not find a suitable example. Everywhere some difficult ways.

In the end, at least tell me how to set the color of the unallocated icon.

    1 answer 1

    Add a picture in Assets.xcassets (Images or as named). Set the image property Render As Original Image :

    enter image description here

    Substitute this picture for the unselected state:

    enter image description here

    Get the result:

    enter image description here

    • A little later, try, as will poppy available. But thanks in advance! - cheerful_weasel
    • Yes, it worked! Thank you so much! - cheerful_weasel