Oddly the tab view does not respect the color assigned to the background by default (being black in this case), is this something that I need to define a glitch I should submit in feedback?
Tab bar color does not respect in more view.
Adding .listRowBackground(/*@START_MENU_TOKEN@*//*@PLACEHOLDER=Background View@*/Color.black/*@END_MENU_TOKEN@*/)
does not change color to black
.tint(.white)
.onAppear {
UIDevice.current.setValue(UIInterfaceOrientation.portrait.rawValue, forKey: "orientation") // Forcing the rotation to portrait
AppDelegate.orientationLock = .portrait // And making sure it stays that way
}.onDisappear {
AppDelegate.orientationLock = .all // Unlocking the rotation when leaving the view
}
.onAppear {
let appearance = UITabBarAppearance()
appearance.backgroundEffect = UIBlurEffect(style: .systemUltraThinMaterial)
appearance.backgroundColor = UIColor(Color.black.opacity(1.0))
// Use this appearance when scrolling behind the TabView:
UITabBar.appearance().standardAppearance = appearance
// Use this appearance when scrolled all the way up:
UITabBar.appearance().scrollEdgeAppearance = appearance
}
}
}
Adding this will at least get you black
.preferredColorScheme(/@START_MENU_TOKEN@/.dark/@END_MENU_TOKEN@/)