Change Tabbed View Bar Color SwiftUI

SwiftUI 1.0 – Using named colors

Combining barTintColor and isTranslucent

For some reason I wasn’t getting the full color of my named color when I used just barTintColor or even backgroundColor. I had to include isTranslucent too.

Here is my named color:

Named Color

Setting Just barTintColor

Just Bar Tint Color

(As you can see, it is slightly faded)

Setting Just backgroundColor

Just Background Color

(This darkens the bar a little bit)

Setting barTintColor & isTranslucent to False

isTranslucent & barTintColor

This combination is what did it for me:

UITabBar.appearance().isTranslucent = false
UITabBar.appearance().barTintColor = UIColor(named: "Secondary")

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)