Added support for visionOS by adding to #if os(iOS) || os(visionOS)

This commit is contained in:
Richard
2025-03-27 11:19:51 +01:00
parent 606f9be66d
commit 1c3bf9129a
6 changed files with 10 additions and 10 deletions

View File

@@ -13,7 +13,7 @@ import SwiftUI
func isIos6Supported() -> Bool {
if !MTDisplay.initialized {
#if os(iOS)
#if os(iOS) || os(visionOS)
let reqSysVer = "6.0"
let currSysVer = UIDevice.current.systemVersion
if currSysVer.compare(reqSysVer, options: .numeric) != .orderedAscending {
@@ -58,7 +58,7 @@ public class MTDisplay:NSObject {
}
/// For debugging. Shows the object in quick look in Xcode.
#if os(iOS)
#if os(iOS) || os(visionOS)
func debugQuickLookObject() -> Any {
let size = CGSizeMake(self.width, self.ascent + self.descent);
UIGraphicsBeginImageContext(size);