ios - How do I change the colors of each TabBar navigation bar title individually? -


i have tabbar 5 tabs. each tab, want them have different navigation bar color. how can have different color each item?

for other navigation bar titles, i'd them have black color.

you need set @ each view controller bar color code:

uinavigationbar.appearance().bartintcolor = uicolor .redcolor 

while set bar titles black:

uinavigationbar.appearance().tintcolor = uicolor.blackcolor() uinavigationbar.appearance().titletextattributes = [nsforegroundcolorattributename : uicolor.blackcolor()] 

Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -