mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-25 01:31:04 +00:00
fix visionOS build
This commit is contained in:
parent
8f7df06d21
commit
0a15f7ff1c
2 changed files with 4 additions and 2 deletions
|
@ -142,12 +142,14 @@ struct AppView: View {
|
|||
.tag(tab)
|
||||
}
|
||||
}
|
||||
.id(availableTabs.count) /// Resets the TabView state when the number of tabs changes to avoid navigation bar issues and prevent crashes
|
||||
.id(availableTabs.count)
|
||||
#if !os(visionOS)
|
||||
.introspect(.tabView, on: .iOS(.v17, .v18)) { (tabview: UITabBarController) in
|
||||
tabview.tabBar.isHidden = horizontalSizeClass == .regular
|
||||
tabview.customizableViewControllers = []
|
||||
tabview.moreNavigationController.isNavigationBarHidden = true
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
var notificationsSecondaryColumn: some View {
|
||||
|
|
|
@ -5,7 +5,7 @@ import SwiftUI
|
|||
|
||||
public extension View {
|
||||
func addTranslateView(isPresented: Binding<Bool>, text: String) -> some View {
|
||||
#if targetEnvironment(macCatalyst)
|
||||
#if targetEnvironment(macCatalyst) || os(visionOS)
|
||||
return self
|
||||
#else
|
||||
if #available(iOS 17.4, *) {
|
||||
|
|
Loading…
Reference in a new issue