ifdef around all visionOS-specific things

This commit is contained in:
Jesús A. Álvarez 2024-02-17 13:22:49 +01:00
parent c1c7c93c6a
commit 3b4244e4e3
3 changed files with 7 additions and 1 deletions

View File

@ -8,6 +8,7 @@
import UIKit import UIKit
#if os(visionOS)
class KeyboardSceneDelegate: UIResponder, UIWindowSceneDelegate { class KeyboardSceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow? var window: UIWindow?
@ -38,3 +39,4 @@ class KeyboardSceneDelegate: UIResponder, UIWindowSceneDelegate {
} }
} }
} }
#endif

View File

@ -8,6 +8,7 @@
import SwiftUI import SwiftUI
#if os(visionOS)
struct PowerMenu: View { struct PowerMenu: View {
var body: some View { var body: some View {
Menu() { Menu() {
@ -31,3 +32,4 @@ struct PowerMenu: View {
#Preview { #Preview {
PowerMenu() PowerMenu()
} }
#endif

View File

@ -8,7 +8,7 @@
import SwiftUI import SwiftUI
#if os(visionOS)
struct SettingsMenu: View { struct SettingsMenu: View {
var body: some View { var body: some View {
Menu() { Menu() {
@ -146,3 +146,5 @@ struct DisplayScalingFilter {
let filter: CALayerContentsFilter let filter: CALayerContentsFilter
let name: String let name: String
} }
#endif