.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
}
}
}