How to customize bottom tabs appearance? #200
-
|
I want to make the bottom tabs opaque with branded colors for the background and text/icons. All the examples I see online resemble something like this: let tabBarAppearance = UITabBarAppearance()
tabBarAppearance.configureWithOpaqueBackground()
tabBarAppearance.backgroundColor = UIColor(named: "SurfaceBlack")
let normalFont = UIFont(name: "Fustat-Regular", size: 16)!
let selectedFont = UIFont(name: "Fustat-Regular", size: 16)!
// Set selected and unselected item tint colors
let itemAppearance = tabBarAppearance.stackedLayoutAppearance
itemAppearance.selected.iconColor = UIColor(named: "AccentGreen")
itemAppearance.selected.titleTextAttributes = [.foregroundColor: UIColor(named: "AccentGreen")!, .font: selectedFont]
itemAppearance.normal.iconColor = UIColor(named: "OnSurfaceBlack")
itemAppearance.normal.titleTextAttributes = [.foregroundColor: UIColor(named: "OnSurfaceBlack")!, .font: selectedFont]
// Apply
UITabBar.appearance().standardAppearance = tabBarAppearance
UITabBar.appearance().scrollEdgeAppearance = tabBarAppearanceHowever, that never seems to have any effect on the appearance of my tabs. They remain translucent and floating. The only way I've been able to change the appearance is via this: UITabBar.appearance().backgroundColor = UIColor(named: "BrandSecondary")
UITabBar.appearance().isTranslucent = false
UITabBar.appearance().tintColor = .whiteThat gets me close, but I'm unable to change the colors of unselected icons/text. The obvious solution would be this: UITabBar.appearance().unselectedItemTintColor = .whiteBut that doesn't change anything. Is there a best practice for customizing the Hotwire bottom tabs? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Sadly, this isn't a Hotwire Native issue. From my research, there's currently no way to disable the Liquid Glass effect on a native tab bar in iOS 26. It also seems like |
Beta Was this translation helpful? Give feedback.
Sadly, this isn't a Hotwire Native issue. From my research, there's currently no way to disable the Liquid Glass effect on a native tab bar in iOS 26.
It also seems like
itemAppearance.normal.iconColorisn't working correctly. I'd file a bug to Apple to let them know!