ios - Swift - Set tintColor for just one tabBarItem -


i'm trying set tintcolor 1 tabbaritem of tab bar.

currently, have :

self.tabbar.tintcolor = darkgrey self.tabbar.unselecteditemtintcolor = grey 

i have 5 tabbaritems (without text) in tab bar , set first 1 in blue when item selected. checked many questions/answers can't find right solution ...

do know how ?

thank in advance

you have set individually each tabbaritem. can change color of tab bar specific tab putting code on viewdidload().

//setting tabbaritem blue when selected self.tabbaritem.settitletextattributes([nsforegroundcolorattributename: uicolor.blue()], for:.selected) 

Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -