ios – TabBar Merchandise and Button has an mild background

0
77


I’ve an easy TabView with some Tabs inside. Setting the Tab tint colour to my customized colour (some darkish grey), the preview and simulator reveals the anticipated right look, however operating the app on actual machine, the tab bar has an mild background colour. Additionally the customized buttons has additionally an mild background colour set.
enter image description hereenter image description here

I’ve already attempt to customise the UITabBar.look()

Right here is the code for the TabView:

struct ContentView: View {

init() {
    let tabBarAppear = UITabBarAppearance()
    tabBarAppear.configureWithOpaqueBackground()
    tabBarAppear.backgroundColor = UIColor.textLight

    UITabBar.look().standardAppearance = tabBarAppear
    if #obtainable(iOS 15.0, *) {
        UITabBar.look().scrollEdgeAppearance = tabBarAppear
    }
    
    
}

var physique: some View {
    TabView {
        Group {
            NavigationStack {
                CurrentRentedBooksView()
                    .navigationTitle("Aktuelle Bücher")
            }
            .tag(0)
            .tabItem {
                Label("Aktuell", systemImage: "e book")
            }
            
            NavigationStack {
                ReadedBooksView()
                    .navigationTitle("Gelesene Bücher")
            }
            .tag(1)
            .tabItem {
                Label("Gelesen", systemImage: "eyeglasses")
            }
            
            NavigationStack {
                UnreadedBooksView()
                    .navigationTitle("Ungelesene Bücher")
            }
            .tag(2)
            .tabItem {
                Label("Ungelesen", systemImage: "eyeglasses.slash")
            }
        }
    }

    .tint(.grayElement)
    
}

}

And the customized Button:

Button {
   isLoading = true
   performAuthorSearch(for: e book.writer)
} label: {
    Picture(systemName: "magnifyingglass.circle")
       .resizable()
       .foregroundStyle(.textLight)
       .body(width: 45, top: 45)
       .background(LinearGradient(colours: [.lightRed, .lightBlue], startPoint: .prime, endPoint: .trailing))
       .clipShape(RoundedRectangle(cornerRadius: 22))
}

My machine has newest model 17.5.1

Thanks