Post

Replies

Boosts

Views

Activity

Reply to Unable to change TabView's background color
Hello, Yes I tried them all. Most of those answers are about changing the color of the TabView bar, not the background of the TabView. Here is what I tried: Added the following to both init() and .onAppear() let appearance = UITabBarAppearance() appearance.configureWithTransparentBackground() appearance.backgroundColor = .clear UITabBar.appearance().standardAppearance = appearance Background modifier TabView{...}.background(.clear) Toolbar modifier TabView{...}.toolbarBackground(.clear, for: .tabBar) TabView{...}.toolbarBackground(.visible, for: .tabBar) None of the above worked. The background for TabView remained white (or black if the device has Dark Mode enabled). The only thing that allows me to make the background of the TabView clear is if I add this: TabView{...}.tabViewStyle(.page) TabView{...}.indexViewStyle(.page(backgroundDisplayMode: .always)) But this then changes the TabView behavior to a page view. This is with Xcode 16.0, happening both in the Simulator and on device running on iOS 18.1.1.
Nov ’24