Skip to content

Commit

Permalink
Merge pull request #51 from codelathe/initial_visionOS_support
Browse files Browse the repository at this point in the history
Initial visionOS support
  • Loading branch information
CSolanaM authored Mar 11, 2024
2 parents 242090e + d7aa22e commit 84a0adf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Sources/SkeletonUI/Enumerations/AppearanceType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public enum GradientType: Equatable {

public struct SkeletonColor {
public static var primary: Color {
#if os(iOS)
#if os(iOS) || os(visionOS)
return Color(.systemGray4)
#elseif os(tvOS)
return Color(.tertiaryLabel)
Expand All @@ -20,7 +20,7 @@ public struct SkeletonColor {
}

public static var background: Color {
#if os(iOS)
#if os(iOS) || os(visionOS)
return Color(.systemGray6)
#elseif os(tvOS)
return Color(.secondaryLabel)
Expand Down
8 changes: 4 additions & 4 deletions Sources/SkeletonUI/Extensions/Image+OptionalType.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SwiftUI

public extension Image {
#if os(iOS) || os(tvOS) || os(watchOS)
#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)
init(uiImage: UIImage?) {
if let uiImage = uiImage {
self.init(uiImage: uiImage)
Expand Down Expand Up @@ -44,7 +44,7 @@ public extension Image {
}
}

#if os(iOS) || os(tvOS) || os(watchOS)
#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)
init(systemName: String?) {
if let systemName = systemName {
self.init(systemName: systemName)
Expand All @@ -54,7 +54,7 @@ public extension Image {
}
#endif

#if os(iOS) || os(tvOS) || os(watchOS)
#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)
init(_ cgImage: CGImage?, scale: CGFloat, orientation: Image.Orientation = .up, label: Text) {
if let cgImage = cgImage {
self.init(cgImage, scale: scale, orientation: orientation, label: label)
Expand All @@ -77,7 +77,7 @@ public extension Image {
}
#endif

#if os(iOS) || os(tvOS) || os(watchOS)
#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)
init(decorative cgImage: CGImage?, scale: CGFloat, orientation: Image.Orientation = .up) {
if let cgImage = cgImage {
self.init(decorative: cgImage, scale: scale, orientation: orientation)
Expand Down

0 comments on commit 84a0adf

Please sign in to comment.