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
#if os(visionOS)
class KeyboardSceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
@ -38,3 +39,4 @@ class KeyboardSceneDelegate: UIResponder, UIWindowSceneDelegate {
}
}
}
#endif

View File

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

View File

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