TabView Item's Background Colors Behaves Differently in SwiftUI

Hi. Background color of tabItems behave differently on different devices.

This is what I want and also works correctly in my wife's phone (iPhone SE2 iOS 16) and on emulator

This is what I get in my phone (iPhone 12 iOS 16)

It has some blue background color that I don't want.

Here is the code of TabView:

TabView {
    HomeView()
        .tabItem {
            Label("Home", systemImage: "house.fill")
        }
    ListView().tabItem {
        Label("My Snippets", systemImage: "tablecells.fill")
    }
    
    HelpView().tabItem {
        Label("Help", systemImage: "questionmark.square.fill")
    }
}

I couldn't find what causes this. Any help will be greatly appreciated.

Accepted Answer

This isn’t a SwiftUI or device type problem, it’s to do with your Accessibility settings.

Go to Settings > Accessibility > Display & Text Size and set the Button Shapes toggle to false. This should fix your problem.

TabView Item's Background Colors Behaves Differently in SwiftUI
 
 
Q