how do we get the default color of unselected UITabBarItem Image?
Searched all over SO only returns methods to change, while what I want is only to get the color.
Any idea?
how do we get the default color of unselected UITabBarItem Image?
Searched all over SO only returns methods to change, while what I want is only to get the color.
Any idea?
As far as I remember (I looked into something similar about a year ago) there is no system API to get the "dimmed" colour of inactive controls. I did however reverse engineer the dimming to look relatively similar.
In essence, the dimming desaturates the colour and reduces brightness. This can result in black colours, which might not be what you want though.
You would use this as follows, where
tintColor
is obtained from a UIView or a button or some other tinted element: